<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>SystemSharp: SQLite.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">SystemSharp
   &#160;<span id="projectnumber">0.3</span>
   </div>
   <div id="projectbrief">A system-level modeling framework for designing real-time embedded systems</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_s_q_lite_8cs_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Events</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">SQLite.cs</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_s_q_lite_8cs.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// Copyright (c) 2009-2012 Krueger Systems, Inc.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// </span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">// Permission is hereby granted, free of charge, to any person obtaining a copy</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// in the Software without restriction, including without limitation the rights</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">// copies of the Software, and to permit persons to whom the Software is</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// furnished to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">// </span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">// The above copyright notice and this permission notice shall be included in</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// all copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// </span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// THE SOFTWARE.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#if WINDOWS_PHONE &amp;&amp; !USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define USE_CSHARP_SQLITE</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">using</span> System;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">using</span> System.Diagnostics;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">using</span> System.Runtime.InteropServices;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">using</span> System.Collections.Generic;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">using</span> System.Reflection;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">using</span> System.Linq;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">using</span> System.Linq.Expressions;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">using</span> System.Threading;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#if USE_CSHARP_SQLITE</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor"></span><span class="keyword">using</span> Sqlite3 = Community.CsharpSqlite.Sqlite3;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="keyword">using</span> <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> = Community.CsharpSqlite.Sqlite3.sqlite3;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">using</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> = Community.CsharpSqlite.Sqlite3.Vdbe;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#elif USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor"></span><span class="keyword">using</span> Sqlite3 = Sqlite.Sqlite3;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">using</span> <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> = Sqlite.Database;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">using</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> = Sqlite.Statement;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">   44</a></span>&#160;<span class="preprocessor"></span><span class="keyword">using</span> <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> = System.IntPtr;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">   45</a></span>&#160;<span class="keyword">using</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> = System.IntPtr;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="namespace_s_q_lite.html">   48</a></span>&#160;<span class="keyword">namespace </span>SQLite</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_exception.html">   50</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html">SQLiteException</a> : System.Exception</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    {</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_exception.html#a973d7bbe93363a91182d852fed38f5f3">   52</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">SQLite3.Result</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html#a973d7bbe93363a91182d852fed38f5f3">Result</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_exception.html#a360138124608a44ec47ab94e6bb988f8">   54</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html#a360138124608a44ec47ab94e6bb988f8">SQLiteException</a> (<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a> r,<span class="keywordtype">string</span> message) : base(message)</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html#a973d7bbe93363a91182d852fed38f5f3">Result</a> = r;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        }</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_exception.html#ac74e9093fc476760b090efb43d226a97">   59</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html">SQLiteException</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html#ac74e9093fc476760b090efb43d226a97">New</a> (<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a> r, <span class="keywordtype">string</span> message)</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html#a360138124608a44ec47ab94e6bb988f8">SQLiteException</a> (r, message);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    [Flags]</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439">   66</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439">SQLiteOpenFlags</a> {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a131fb182a881796e7606ed6da27f1197">ReadOnly</a> = 1, <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a70a2a84088d405a2e3f1e3accaa16723">ReadWrite</a> = 2, <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a686e697538050e4664636337cc3b834f">Create</a> = 4,</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439aed897a216de36c7c934c4baa02b4fea7">NoMutex</a> = 0x8000, <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a3322fce9aa781563c086ffd3c13da8b4">FullMutex</a> = 0x10000,</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439add8141c2dbba4f369c304f748a6badf6">SharedCache</a> = 0x20000, <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a54f0a906e1d7cbe43867c40793c22c91">PrivateCache</a> = 0x40000,</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439af6b459b732ab3369bd8fb1b31d3d019d">ProtectionComplete</a> = 0x00100000,</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439ae16febbf8611e3d5db7ed971e2bcb0f7">ProtectionCompleteUnlessOpen</a> = 0x00200000,</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439ad729bc99ed371feb5cc190b05f417172">ProtectionCompleteUntilFirstUserAuthentication</a> = 0x00300000,</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a3c2d862f4536788c6b00eb3bbdcd81bf">ProtectionNone</a> = 0x00400000</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html">   79</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">partial class </span><a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> : IDisposable</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">bool</span> _open;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keyword">private</span> TimeSpan _busyTimeout;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keyword">private</span> Dictionary&lt;string, TableMapping&gt; _mappings = null;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keyword">private</span> Dictionary&lt;string, TableMapping&gt; _tables = null;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keyword">private</span> System.Diagnostics.Stopwatch _sw;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">long</span> _elapsedMilliseconds = 0;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">int</span> _trasactionDepth = 0;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keyword">private</span> Random _rand = <span class="keyword">new</span> Random ();</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">   91</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keyword">internal</span> <span class="keyword">static</span> readonly <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> NullHandle = <span class="keywordflow">default</span>(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a>);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">   94</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">   96</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">TimeExecution</a> { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#af9e92ae222dba65b2ab761139531118a">   98</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af9e92ae222dba65b2ab761139531118a">Trace</a> { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">  100</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">StoreDateTimeAsTicks</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a21204da14d0e2a44039f3395bb4ff12d">  114</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a21204da14d0e2a44039f3395bb4ff12d">SQLiteConnection</a> (<span class="keywordtype">string</span> databasePath, <span class="keywordtype">bool</span> storeDateTimeAsTicks = <span class="keyword">false</span>)</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            : this (databasePath, <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439">SQLiteOpenFlags</a>.<a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a70a2a84088d405a2e3f1e3accaa16723">ReadWrite</a> | <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439">SQLiteOpenFlags</a>.<a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a686e697538050e4664636337cc3b834f">Create</a>, storeDateTimeAsTicks)</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5d0deb6299d3f479e53cf81899023457">  131</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5d0deb6299d3f479e53cf81899023457">SQLiteConnection</a> (<span class="keywordtype">string</span> databasePath, <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439">SQLiteOpenFlags</a> openFlags, <span class="keywordtype">bool</span> storeDateTimeAsTicks = <span class="keyword">false</span>)</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a> = databasePath;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="preprocessor">#if NETFX_CORE</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor"></span>            SQLite3.SetDirectory(<span class="comment">/*temp directory type*/</span>2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> handle;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="preprocessor">#if SILVERLIGHT || USE_CSHARP_SQLITE</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="preprocessor"></span>            var r = SQLite3.Open (databasePath, out handle, (int)openFlags, IntPtr.Zero);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="preprocessor"></span>            <span class="comment">// open using the byte[]</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            <span class="comment">// in the case where the path may include Unicode</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            <span class="comment">// force open to using UTF-8 using sqlite3_open_v2</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;            var databasePathAsBytes = GetNullTerminatedUtf8 (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a>);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;            var r = SQLite3.Open (databasePathAsBytes, out handle, (int) openFlags, IntPtr.Zero);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a> = handle;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            <span class="keywordflow">if</span> (r != <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.OK) {</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (r, String.Format (<span class="stringliteral">&quot;Could not open database file: {0} ({1})&quot;</span>, <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a>, r));</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            }</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;            _open = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">StoreDateTimeAsTicks</a> = storeDateTimeAsTicks;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#abb2b70df282aa2f1af07789db65db1dd">BusyTimeout</a> = TimeSpan.FromSeconds (0.1);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> ()</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        {</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            <span class="keywordflow">if</span> (_preserveDuringLinkMagic) {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                var ti = <span class="keyword">new</span> ColumnInfo ();</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                ti.Name = <span class="stringliteral">&quot;magic&quot;</span>;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;            }</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        }</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keyword">static</span> byte[] GetNullTerminatedUtf8 (<span class="keywordtype">string</span> s)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        {</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            var utf8Length = System.Text.Encoding.UTF8.GetByteCount (s);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            var bytes = <span class="keyword">new</span> byte [utf8Length + 1];</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            utf8Length = System.Text.Encoding.UTF8.GetBytes(s, 0, s.Length, bytes, 0);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            <span class="keywordflow">return</span> bytes;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">bool</span> _preserveDuringLinkMagic = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#abb2b70df282aa2f1af07789db65db1dd">  188</a></span>&#160;        <span class="keyword">public</span> TimeSpan <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#abb2b70df282aa2f1af07789db65db1dd">BusyTimeout</a> {</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> _busyTimeout; }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            set {</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                _busyTimeout = value;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a> != NullHandle) {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                    SQLite3.BusyTimeout (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a>, (int)_busyTimeout.TotalMilliseconds);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            }</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ac0c3b1e8f8060ef9777fac08751d159e">  202</a></span>&#160;        <span class="keyword">public</span> IEnumerable&lt;TableMapping&gt; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ac0c3b1e8f8060ef9777fac08751d159e">TableMappings</a> {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            <span class="keyword">get</span> {</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                <span class="keywordflow">if</span> (_tables == null) {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                    <span class="keywordflow">return</span> Enumerable.Empty&lt;<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a>&gt; ();</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;                    <span class="keywordflow">return</span> _tables.Values;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;                }</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            }</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">  222</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (Type type)</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        {</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            <span class="keywordflow">if</span> (_mappings == null) {</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;                _mappings = <span class="keyword">new</span> Dictionary&lt;string, TableMapping&gt; ();</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            }</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            <span class="keywordflow">if</span> (!_mappings.TryGetValue (type.FullName, out map)) {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                map = <span class="keyword">new</span> <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> (type);</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                _mappings [type.FullName] = map;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;            }</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            <span class="keywordflow">return</span> map;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        }</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        </div>
<div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#adf0ed08567e1ca36e4fda72c94ede544">  242</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#adf0ed08567e1ca36e4fda72c94ede544">GetMapping&lt;T&gt;</a> ()</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (typeof (T));</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        }</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        <span class="keyword">private</span> <span class="keyword">struct </span>IndexedColumn</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">int</span> Order;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> ColumnName;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        }</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keyword">private</span> <span class="keyword">struct </span>IndexInfo</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> IndexName;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> TableName;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> Unique;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;            <span class="keyword">public</span> List&lt;IndexedColumn&gt; Columns;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        }</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a783032226b2db2ebd6417f21abe9cd5a">  264</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a783032226b2db2ebd6417f21abe9cd5a">DropTable&lt;T&gt;</a>()</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        {</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (typeof (T));</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;            var query = string.Format(<span class="stringliteral">&quot;drop table if exists \&quot;{0}\&quot;&quot;</span>, map.TableName);</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (query);</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        </div>
<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1a76c62e25bff4f6bbf5366175ab3bf7">  282</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1a76c62e25bff4f6bbf5366175ab3bf7">CreateTable&lt;T&gt;</a>()</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a3e1bbdd7aebce4f815ca35b8277e1270">CreateTable</a>(typeof (T));</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a3e1bbdd7aebce4f815ca35b8277e1270">  297</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a3e1bbdd7aebce4f815ca35b8277e1270">CreateTable</a>(Type ty)</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        {</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;            <span class="keywordflow">if</span> (_tables == null) {</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;                _tables = <span class="keyword">new</span> Dictionary&lt;string, TableMapping&gt; ();</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;            }</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;            <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            <span class="keywordflow">if</span> (!_tables.TryGetValue (ty.FullName, out map)) {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;                map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (ty);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;                _tables.Add (ty.FullName, map);</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            }</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            var query = <span class="stringliteral">&quot;create table if not exists \&quot;&quot;</span> + map.TableName + <span class="stringliteral">&quot;\&quot;(\n&quot;</span>;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;            </div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            var decls = map.Columns.Select (p =&gt; Orm.SqlDecl (p, <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">StoreDateTimeAsTicks</a>));</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;            var decl = string.Join (<span class="stringliteral">&quot;,\n&quot;</span>, decls.ToArray ());</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;            query += decl;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;            query += <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;            </div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;            var count = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (query);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;            </div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;            <span class="keywordflow">if</span> (count == 0) { <span class="comment">//Possible bug: This always seems to return 0?</span></div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                <span class="comment">// Table already exists, migrate it</span></div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                MigrateTable (map);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            }</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;            var indexes = <span class="keyword">new</span> Dictionary&lt;string, IndexInfo&gt; ();</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            <span class="keywordflow">foreach</span> (var c <span class="keywordflow">in</span> map.Columns) {</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;                <span class="keywordflow">foreach</span> (var i <span class="keywordflow">in</span> c.Indices) {</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;                    var iname = i.Name ?? map.TableName + <span class="stringliteral">&quot;_&quot;</span> + c.Name;</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;                    IndexInfo iinfo;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;                    <span class="keywordflow">if</span> (!indexes.TryGetValue (iname, out iinfo)) {</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;                        iinfo = <span class="keyword">new</span> IndexInfo {</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                            IndexName = iname,</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;                            TableName = map.TableName,</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;                            Unique = i.Unique,</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;                            Columns = <span class="keyword">new</span> List&lt;IndexedColumn&gt; ()</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                        };</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                        indexes.Add (iname, iinfo);</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;                    }</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;                    <span class="keywordflow">if</span> (i.Unique != iinfo.Unique)</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;                        <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception (<span class="stringliteral">&quot;All the columns in an index must have the same value for their Unique property&quot;</span>);</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;                    iinfo.Columns.Add (<span class="keyword">new</span> IndexedColumn {</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                        Order = i.Order,</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                        ColumnName = c.Name</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;                    });</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;                }</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;            }</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;            <span class="keywordflow">foreach</span> (var indexName <span class="keywordflow">in</span> indexes.Keys) {</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;                var index = indexes[indexName];</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;                <span class="keyword">const</span> <span class="keywordtype">string</span> sqlFormat = <span class="stringliteral">&quot;create {3} index if not exists \&quot;{0}\&quot; on \&quot;{1}\&quot;(\&quot;{2}\&quot;)&quot;</span>;</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;                var columns = String.Join(<span class="stringliteral">&quot;\&quot;,\&quot;&quot;</span>, index.Columns.OrderBy(i =&gt; i.Order).Select(i =&gt; i.ColumnName).ToArray());</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;                var sql = String.Format (sqlFormat, indexName, index.TableName, columns, index.Unique ? <span class="stringliteral">&quot;unique&quot;</span> : <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;                count += <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a>(sql);</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;            }</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;            </div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;            <span class="keywordflow">return</span> count;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        }</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;</div>
<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html">  357</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html">ColumnInfo</a></div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        {</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;<span class="comment">//          public int cid { get; set; }</span></div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;            [Column (<span class="stringliteral">&quot;name&quot;</span>)]</div>
<div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#a6ff7d46bc88a8f3484f7b701732396fe">  362</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#a6ff7d46bc88a8f3484f7b701732396fe">Name</a> { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="comment">//          [Column (&quot;type&quot;)]</span></div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;<span class="comment">//          public string ColumnType { get; set; }</span></div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;<span class="comment">//          public int notnull { get; set; }</span></div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;<span class="comment">//          public string dflt_value { get; set; }</span></div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;<span class="comment">//          public int pk { get; set; }</span></div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div>
<div class="line"><a name="l00373"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#af1ba3d13d1ccc9d2389c086f4e64610c">  373</a></span>&#160;            <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#af1ba3d13d1ccc9d2389c086f4e64610c">ToString</a> ()</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;            {</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#a6ff7d46bc88a8f3484f7b701732396fe">Name</a>;</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;            }</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;        }</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;</div>
<div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#af85031e61990a4d11d10533da5acb21c">  379</a></span>&#160;        <span class="keyword">public</span> IEnumerable&lt;ColumnInfo&gt; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af85031e61990a4d11d10533da5acb21c">GetTableInfo</a> (<span class="keywordtype">string</span> tableName)</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        {</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;            var query = <span class="stringliteral">&quot;pragma table_info(\&quot;&quot;</span> + tableName + <span class="stringliteral">&quot;\&quot;)&quot;</span>;         </div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;            <span class="keywordflow">return</span> Query&lt;ColumnInfo&gt; (query);</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        }</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        <span class="keywordtype">void</span> MigrateTable (<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map)</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        {</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;            var existingCols = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af85031e61990a4d11d10533da5acb21c">GetTableInfo</a> (map.<a class="code" href="class_s_q_lite_1_1_table_mapping.html#aa4f8f4620985ceca6db33ab061649f29">TableName</a>);</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;            </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            var toBeAdded = <span class="keyword">new</span> List&lt;<a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">TableMapping.Column</a>&gt; ();</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;            </div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;            <span class="keywordflow">foreach</span> (var p <span class="keywordflow">in</span> map.<a class="code" href="class_s_q_lite_1_1_table_mapping.html#ae108c0714634387100fccf5001b73672">Columns</a>) {</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;                var found = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;                <span class="keywordflow">foreach</span> (var c <span class="keywordflow">in</span> existingCols) {</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;                    found = (string.Compare (p.Name, c.Name, StringComparison.OrdinalIgnoreCase) == 0);</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;                    <span class="keywordflow">if</span> (found)</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;                }</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;                <span class="keywordflow">if</span> (!found) {</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;                    toBeAdded.Add (p);</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;                }</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;            }</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;            </div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;            <span class="keywordflow">foreach</span> (var p <span class="keywordflow">in</span> toBeAdded) {</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;                var addCol = <span class="stringliteral">&quot;alter table \&quot;&quot;</span> + map.TableName + <span class="stringliteral">&quot;\&quot; add column &quot;</span> + Orm.SqlDecl (p, <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">StoreDateTimeAsTicks</a>);</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;                <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (addCol);</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;            }</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        }</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;</div>
<div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a7535db6cca83fcde078fa4340b32e982">  413</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html">SQLiteCommand</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a7535db6cca83fcde078fa4340b32e982">NewCommand</a> ()</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        {</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html">SQLiteCommand</a> (<span class="keyword">this</span>);</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        }</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;</div>
<div class="line"><a name="l00431"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">  431</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html">SQLiteCommand</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a> (<span class="keywordtype">string</span> cmdText, params <span class="keywordtype">object</span>[] ps)</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        {</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;            <span class="keywordflow">if</span> (!_open) {</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (SQLite3.Result.Error, <span class="stringliteral">&quot;Cannot create commands from unopened database&quot;</span>);</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;                var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a7535db6cca83fcde078fa4340b32e982">NewCommand</a> ();</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;                cmd.CommandText = cmdText;</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;                <span class="keywordflow">foreach</span> (var o <span class="keywordflow">in</span> ps) {</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;                    cmd.Bind (o);</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;                }</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;                <span class="keywordflow">return</span> cmd;</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;            }</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        }</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;</div>
<div class="line"><a name="l00462"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">  462</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (<span class="keywordtype">string</span> query, params <span class="keywordtype">object</span>[] args)</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;        {</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;            var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a> (query, args);</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;            </div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">TimeExecution</a>) {</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;                <span class="keywordflow">if</span> (_sw == null) {</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;                    _sw = <span class="keyword">new</span> System.Diagnostics.Stopwatch ();</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;                }</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;                _sw.Reset ();</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;                _sw.Start ();</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;            }</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;            var r = cmd.ExecuteNonQuery ();</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;            </div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">TimeExecution</a>) {</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;                _sw.Stop ();</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;                _elapsedMilliseconds += _sw.ElapsedMilliseconds;</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;                Debug.WriteLine (string.Format (<span class="stringliteral">&quot;Finished in {0} ms ({1:0.0} s total)&quot;</span>, _sw.ElapsedMilliseconds, _elapsedMilliseconds / 1000.0));</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;            }</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;            </div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        }</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;</div>
<div class="line"><a name="l00485"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#af88acbe7da213c81875c3a35a5d61337">  485</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af88acbe7da213c81875c3a35a5d61337">ExecuteScalar&lt;T&gt;</a> (<span class="keywordtype">string</span> query, params <span class="keywordtype">object</span>[] args)</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        {</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a> (query, args);</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;            </div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">TimeExecution</a>) {</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;                <span class="keywordflow">if</span> (_sw == null) {</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;                    _sw = <span class="keyword">new</span> System.Diagnostics.Stopwatch ();</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;                }</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;                _sw.Reset ();</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;                _sw.Start ();</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;            }</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;            </div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;            var r = cmd.ExecuteScalar&lt;T&gt; ();</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;            </div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">TimeExecution</a>) {</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;                _sw.Stop ();</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;                _elapsedMilliseconds += _sw.ElapsedMilliseconds;</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;                Debug.WriteLine (string.Format (<span class="stringliteral">&quot;Finished in {0} ms ({1:0.0} s total)&quot;</span>, _sw.ElapsedMilliseconds, _elapsedMilliseconds / 1000.0));</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;            }</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;            </div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;            <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;        }</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;</div>
<div class="line"><a name="l00523"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ade363948abe65a6b97fe8574f943db91">  523</a></span>&#160;        <span class="keyword">public</span> List&lt;T&gt; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ade363948abe65a6b97fe8574f943db91">Query&lt;T&gt;</a> (<span class="keywordtype">string</span> query, params <span class="keywordtype">object</span>[] args) where T : <span class="keyword">new</span>()</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;        {</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;            var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a> (query, args);</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;            <span class="keywordflow">return</span> cmd.ExecuteQuery&lt;T&gt; ();</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        }</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;</div>
<div class="line"><a name="l00546"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a334b139ead4620ad13b5e1d54e8077af">  546</a></span>&#160;        <span class="keyword">public</span> IEnumerable&lt;T&gt; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a334b139ead4620ad13b5e1d54e8077af">DeferredQuery&lt;T&gt;</a>(<span class="keywordtype">string</span> query, params <span class="keywordtype">object</span>[] args) where T : <span class="keyword">new</span>()</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;        {</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;            var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a>(query, args);</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;            <span class="keywordflow">return</span> cmd.ExecuteDeferredQuery&lt;T&gt;();</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;        }</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;</div>
<div class="line"><a name="l00572"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#aeac8a5ef1be5cfabc5bbf33f1fec01b0">  572</a></span>&#160;        <span class="keyword">public</span> List&lt;object&gt; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#aeac8a5ef1be5cfabc5bbf33f1fec01b0">Query</a> (<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map, <span class="keywordtype">string</span> query, params <span class="keywordtype">object</span>[] args)</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        {</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;            var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a> (query, args);</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;            <span class="keywordflow">return</span> cmd.ExecuteQuery&lt;<span class="keywordtype">object</span>&gt; (map);</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;        }</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;</div>
<div class="line"><a name="l00600"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab359d97e7938a573e0a565d2c46aa401">  600</a></span>&#160;        <span class="keyword">public</span> IEnumerable&lt;object&gt; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab359d97e7938a573e0a565d2c46aa401">DeferredQuery</a>(<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map, <span class="keywordtype">string</span> query, params <span class="keywordtype">object</span>[] args)</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        {</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;            var cmd = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">CreateCommand</a>(query, args);</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;            <span class="keywordflow">return</span> cmd.ExecuteDeferredQuery&lt;<span class="keywordtype">object</span>&gt;(map);</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;        }</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;</div>
<div class="line"><a name="l00613"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab44d5100216c3cdcea76e45c6f7d6246">  613</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab44d5100216c3cdcea76e45c6f7d6246">Table&lt;T&gt;</a> () where T : <span class="keyword">new</span>()</div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;        {</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> (<span class="keyword">this</span>);</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;        }</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;</div>
<div class="line"><a name="l00630"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a17fdec8364635853d573e84530e1ab48">  630</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a17fdec8364635853d573e84530e1ab48">Get&lt;T&gt;</a> (<span class="keywordtype">object</span> pk) where T : <span class="keyword">new</span>()</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;        {</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (typeof(T));</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ade363948abe65a6b97fe8574f943db91">Query&lt;T&gt;</a> (map.GetByPrimaryKeySql, pk).First ();</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;        }</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;</div>
<div class="line"><a name="l00647"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a4034d4b62385b2ab7451c5404ffb5efa">  647</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a17fdec8364635853d573e84530e1ab48">Get&lt;T&gt;</a> (Expression&lt;Func&lt;T, bool&gt;&gt; predicate) where T : <span class="keyword">new</span>()</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;        {</div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab44d5100216c3cdcea76e45c6f7d6246">Table&lt;T&gt;</a> ().Where (predicate).First ();</div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;        }</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;</div>
<div class="line"><a name="l00664"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#adfe66fe8c304aca8575f07fc1c05d9f5">  664</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#adfe66fe8c304aca8575f07fc1c05d9f5">Find&lt;T&gt;</a> (<span class="keywordtype">object</span> pk) where T : <span class="keyword">new</span> ()</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;        {</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (typeof (T));</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ade363948abe65a6b97fe8574f943db91">Query&lt;T&gt;</a> (map.GetByPrimaryKeySql, pk).FirstOrDefault ();</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;        }</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;</div>
<div class="line"><a name="l00685"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a95729c5ebf5fad75631109db91e7c14b">  685</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">object</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a95729c5ebf5fad75631109db91e7c14b">Find</a> (<span class="keywordtype">object</span> pk, <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map)</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;        {</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#aeac8a5ef1be5cfabc5bbf33f1fec01b0">Query</a> (map, map.<a class="code" href="class_s_q_lite_1_1_table_mapping.html#acf2d379f40ca0ac2cfa6204a1d50e201">GetByPrimaryKeySql</a>, pk).FirstOrDefault ();</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;        }</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;        </div>
<div class="line"><a name="l00701"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#aeba2ae3cf5c1ffcb0c7eec7f8ccc64ca">  701</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#adfe66fe8c304aca8575f07fc1c05d9f5">Find&lt;T&gt;</a> (Expression&lt;Func&lt;T, bool&gt;&gt; predicate) where T : <span class="keyword">new</span>()</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;        {</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab44d5100216c3cdcea76e45c6f7d6246">Table&lt;T&gt;</a> ().Where (predicate).FirstOrDefault ();</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;        }</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;</div>
<div class="line"><a name="l00709"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9450dfedb603c08eb75f57f36db41d9b">  709</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9450dfedb603c08eb75f57f36db41d9b">IsInTransaction</a> {</div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> _trasactionDepth &gt; 0; }</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;        }</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;</div>
<div class="line"><a name="l00717"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#aba3becdb524808bd49f349587f1b7049">  717</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#aba3becdb524808bd49f349587f1b7049">BeginTransaction</a> ()</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;        {</div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;            <span class="comment">// The BEGIN command only works if the transaction stack is empty, </span></div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;            <span class="comment">//    or in other words if there are no pending transactions. </span></div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;            <span class="comment">// If the transaction stack is not empty when the BEGIN command is invoked, </span></div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;            <span class="comment">//    then the command fails with an error.</span></div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;            <span class="comment">// Rather than crash with an error, we will just ignore calls to BeginTransaction</span></div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;            <span class="comment">//    that would result in an error.</span></div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;            <span class="keywordflow">if</span> (Interlocked.CompareExchange (ref _trasactionDepth, 1, 0) == 0) {</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;                <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;                    <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (<span class="stringliteral">&quot;begin transaction&quot;</span>);</div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;                } <span class="keywordflow">catch</span> (Exception ex) {</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;                    var sqlExp = ex as <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html">SQLiteException</a>;</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;                    <span class="keywordflow">if</span> (sqlExp != null) {</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;                        <span class="comment">// It is recommended that applications respond to the errors listed below </span></div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;                        <span class="comment">//    by explicitly issuing a ROLLBACK command.</span></div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;                        <span class="comment">// TODO: This rollback failsafe should be localized to all throw sites.</span></div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;                        <span class="keywordflow">switch</span> (sqlExp.Result) {</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;                        <span class="keywordflow">case</span> SQLite3.Result.IOError:</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;                        <span class="keywordflow">case</span> SQLite3.Result.Full:</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;                        <span class="keywordflow">case</span> SQLite3.Result.Busy:</div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;                        <span class="keywordflow">case</span> SQLite3.Result.NoMem:</div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;                        <span class="keywordflow">case</span> SQLite3.Result.Interrupt:</div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;                            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">RollbackTo</a> (null, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;                            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;                        }</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;                        <span class="comment">// Call decrement and not VolatileWrite in case we&#39;ve already </span></div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;                        <span class="comment">//    created a transaction point in SaveTransactionPoint since the catch.</span></div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;                        Interlocked.Decrement (ref _trasactionDepth);</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;                    }</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;                    <span class="keywordflow">throw</span>;</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;                }</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;            } <span class="keywordflow">else</span> { </div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;                <span class="comment">// Calling BeginTransaction on an already open transaction is invalid</span></div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> System.InvalidOperationException (<span class="stringliteral">&quot;Cannot begin a transaction while already in a transaction.&quot;</span>);</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;            }</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        }</div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;</div>
<div class="line"><a name="l00766"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab571412a681990a95131ded731ad6c4a">  766</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab571412a681990a95131ded731ad6c4a">SaveTransactionPoint</a> ()</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;        {</div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;            <span class="keywordtype">int</span> depth = Interlocked.Increment (ref _trasactionDepth) - 1;</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;            <span class="keywordtype">string</span> retVal = <span class="stringliteral">&quot;S&quot;</span> + (short)_rand.Next (<span class="keywordtype">short</span>.MaxValue) + <span class="stringliteral">&quot;D&quot;</span> + depth;</div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;            <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;                <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (<span class="stringliteral">&quot;savepoint &quot;</span> + retVal);</div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;            } <span class="keywordflow">catch</span> (Exception ex) {</div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;                var sqlExp = ex as <a class="code" href="class_s_q_lite_1_1_s_q_lite_exception.html">SQLiteException</a>;</div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;                <span class="keywordflow">if</span> (sqlExp != null) {</div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;                    <span class="comment">// It is recommended that applications respond to the errors listed below </span></div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;                    <span class="comment">//    by explicitly issuing a ROLLBACK command.</span></div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;                    <span class="comment">// TODO: This rollback failsafe should be localized to all throw sites.</span></div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;                    <span class="keywordflow">switch</span> (sqlExp.Result) {</div>
<div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;                    <span class="keywordflow">case</span> SQLite3.Result.IOError:</div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;                    <span class="keywordflow">case</span> SQLite3.Result.Full:</div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;                    <span class="keywordflow">case</span> SQLite3.Result.Busy:</div>
<div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;                    <span class="keywordflow">case</span> SQLite3.Result.NoMem:</div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;                    <span class="keywordflow">case</span> SQLite3.Result.Interrupt:</div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;                        <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">RollbackTo</a> (null, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;                    }</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;                    Interlocked.Decrement (ref _trasactionDepth);</div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;                }</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;</div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;                <span class="keywordflow">throw</span>;</div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;            }</div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;</div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;            <span class="keywordflow">return</span> retVal;</div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;        }</div>
<div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;</div>
<div class="line"><a name="l00801"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a70cfe1d5799d71ce3a0a62c244bb7ea8">  801</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a70cfe1d5799d71ce3a0a62c244bb7ea8">Rollback</a> ()</div>
<div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;        {</div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">RollbackTo</a> (null, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;        }</div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;</div>
<div class="line"><a name="l00810"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">  810</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">RollbackTo</a> (<span class="keywordtype">string</span> savepoint)</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;        {</div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">RollbackTo</a> (savepoint, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;        }</div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;</div>
<div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">RollbackTo</a> (<span class="keywordtype">string</span> savepoint, <span class="keywordtype">bool</span> noThrow)</div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;        {</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;            <span class="comment">// Rolling back without a TO clause rolls backs all transactions </span></div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;            <span class="comment">//    and leaves the transaction stack empty.   </span></div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;            <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;                <span class="keywordflow">if</span> (String.IsNullOrEmpty (savepoint)) {</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;                    <span class="keywordflow">if</span> (Interlocked.Exchange (ref _trasactionDepth, 0) &gt; 0) {</div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;                        <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (<span class="stringliteral">&quot;rollback&quot;</span>);</div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;                    }</div>
<div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;                    DoSavePointExecute (savepoint, <span class="stringliteral">&quot;rollback to &quot;</span>);</div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;                }   </div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;            } <span class="keywordflow">catch</span> (SQLiteException) {</div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;                <span class="keywordflow">if</span> (!noThrow)</div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;                    <span class="keywordflow">throw</span>;</div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;            </div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;            }</div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;            <span class="comment">// No need to rollback if there are no transactions open.</span></div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;        }</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;</div>
<div class="line"><a name="l00847"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a6813c9dd152354284ccdc96353bcfbdd">  847</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a6813c9dd152354284ccdc96353bcfbdd">Release</a> (<span class="keywordtype">string</span> savepoint)</div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;        {</div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;            DoSavePointExecute (savepoint, <span class="stringliteral">&quot;release &quot;</span>);</div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;        }</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;</div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">void</span> DoSavePointExecute (<span class="keywordtype">string</span> savepoint, <span class="keywordtype">string</span> cmd)</div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;        {</div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;            <span class="comment">// Validate the savepoint</span></div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;            <span class="keywordtype">int</span> firstLen = savepoint.IndexOf (<span class="charliteral">&#39;D&#39;</span>);</div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;            <span class="keywordflow">if</span> (firstLen &gt;= 2 &amp;&amp; savepoint.Length &gt; firstLen + 1) {</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;                <span class="keywordtype">int</span> depth;</div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;                <span class="keywordflow">if</span> (Int32.TryParse (savepoint.Substring (firstLen + 1), out depth)) {</div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;                    <span class="comment">// TODO: Mild race here, but inescapable without locking almost everywhere.</span></div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;                    <span class="keywordflow">if</span> (0 &lt;= depth &amp;&amp; depth &lt; _trasactionDepth) {</div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;<span class="preprocessor">#if NETFX_CORE</span></div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;<span class="preprocessor"></span>                        Volatile.Write (ref _trasactionDepth, depth);</div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;<span class="preprocessor">#elif SILVERLIGHT</span></div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;<span class="preprocessor"></span>                        _trasactionDepth = depth;</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;<span class="preprocessor"></span>                        Thread.VolatileWrite (ref _trasactionDepth, depth);</div>
<div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;<span class="preprocessor"></span>                        <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (cmd + savepoint);</div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;                        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;                    }</div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;                }</div>
<div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;            }</div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException (<span class="stringliteral">&quot;savePoint&quot;</span>, <span class="stringliteral">&quot;savePoint is not valid, and should be the result of a call to SaveTransactionPoint.&quot;</span>);</div>
<div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;        }</div>
<div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;</div>
<div class="line"><a name="l00880"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a2c8187a19b5065f6b23c079e7cca29fe">  880</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a2c8187a19b5065f6b23c079e7cca29fe">Commit</a> ()</div>
<div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;        {</div>
<div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;            <span class="keywordflow">if</span> (Interlocked.Exchange (ref _trasactionDepth, 0) != 0) {</div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;                <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (<span class="stringliteral">&quot;commit&quot;</span>);</div>
<div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;            }</div>
<div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;            <span class="comment">// Do nothing on a commit with no open transaction</span></div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;        }</div>
<div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;</div>
<div class="line"><a name="l00898"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">  898</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">RunInTransaction</a> (Action action)</div>
<div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;        {</div>
<div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;            <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;                var savePoint = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab571412a681990a95131ded731ad6c4a">SaveTransactionPoint</a> ();</div>
<div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160;                action ();</div>
<div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;                <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a6813c9dd152354284ccdc96353bcfbdd">Release</a> (savePoint);</div>
<div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160;            } <span class="keywordflow">catch</span> (Exception) {</div>
<div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160;                <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a70cfe1d5799d71ce3a0a62c244bb7ea8">Rollback</a> ();</div>
<div class="line"><a name="l00906"></a><span class="lineno">  906</span>&#160;                <span class="keywordflow">throw</span>;</div>
<div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;            }</div>
<div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;        }</div>
<div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;</div>
<div class="line"><a name="l00919"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a920c3f7421ad1c967730228abb5915fc">  919</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a920c3f7421ad1c967730228abb5915fc">InsertAll</a> (System.Collections.IEnumerable objects)</div>
<div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;        {</div>
<div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;            var c = 0;</div>
<div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">RunInTransaction</a>(() =&gt; {</div>
<div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;                <span class="keywordflow">foreach</span> (var r <span class="keywordflow">in</span> objects) {</div>
<div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160;                    c += <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (r);</div>
<div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;                }</div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;            });</div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;            <span class="keywordflow">return</span> c;</div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;        }</div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;</div>
<div class="line"><a name="l00942"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a62b62415941ce6486f7dfa219a69f1f1">  942</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a62b62415941ce6486f7dfa219a69f1f1">InsertAll</a> (System.Collections.IEnumerable objects, <span class="keywordtype">string</span> extra)</div>
<div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160;        {</div>
<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;            var c = 0;</div>
<div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">RunInTransaction</a> (() =&gt; {</div>
<div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;                <span class="keywordflow">foreach</span> (var r <span class="keywordflow">in</span> objects) {</div>
<div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;                    c += <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (r, extra);</div>
<div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;                }</div>
<div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;            });</div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;            <span class="keywordflow">return</span> c;</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;        }</div>
<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;</div>
<div class="line"><a name="l00965"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a08e03803dd01aa67ee56a8e6d184c9d9">  965</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a08e03803dd01aa67ee56a8e6d184c9d9">InsertAll</a> (System.Collections.IEnumerable objects, Type objType)</div>
<div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;        {</div>
<div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;            var c = 0;</div>
<div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">RunInTransaction</a> (() =&gt; {</div>
<div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;                <span class="keywordflow">foreach</span> (var r <span class="keywordflow">in</span> objects) {</div>
<div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160;                    c += <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (r, objType);</div>
<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;                }</div>
<div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;            });</div>
<div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;            <span class="keywordflow">return</span> c;</div>
<div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;        }</div>
<div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160;        </div>
<div class="line"><a name="l00986"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">  986</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (<span class="keywordtype">object</span> obj)</div>
<div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;        {</div>
<div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;            <span class="keywordflow">if</span> (obj == null) {</div>
<div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;            }</div>
<div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (obj, <span class="stringliteral">&quot;&quot;</span>, obj.GetType ());</div>
<div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;        }</div>
<div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;</div>
<div class="line"><a name="l01007"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c16c3dda43037326b7f2afc6c822abd"> 1007</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c16c3dda43037326b7f2afc6c822abd">InsertOrReplace</a> (<span class="keywordtype">object</span> obj)</div>
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;        {</div>
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;            <span class="keywordflow">if</span> (obj == null) {</div>
<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;            }</div>
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (obj, <span class="stringliteral">&quot;OR REPLACE&quot;</span>, obj.GetType ());</div>
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;        }</div>
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;</div>
<div class="line"><a name="l01028"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a19576a29af1c0891a646ff3e904f2cdc"> 1028</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a19576a29af1c0891a646ff3e904f2cdc">Insert</a> (<span class="keywordtype">object</span> obj, Type objType)</div>
<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;        {</div>
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (obj, <span class="stringliteral">&quot;&quot;</span>, objType);</div>
<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;        }</div>
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;</div>
<div class="line"><a name="l01049"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a812215a88043259b6a107994756000ae"> 1049</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a812215a88043259b6a107994756000ae">InsertOrReplace</a> (<span class="keywordtype">object</span> obj, Type objType)</div>
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;        {</div>
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (obj, <span class="stringliteral">&quot;OR REPLACE&quot;</span>, objType);</div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;        }</div>
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;        </div>
<div class="line"><a name="l01067"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a3ab0fde4b10c4b492b2f5f64535c6d66"> 1067</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a3ab0fde4b10c4b492b2f5f64535c6d66">Insert</a> (<span class="keywordtype">object</span> obj, <span class="keywordtype">string</span> extra)</div>
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;        {</div>
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;            <span class="keywordflow">if</span> (obj == null) {</div>
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;            }</div>
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">Insert</a> (obj, extra, obj.GetType ());</div>
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;        }</div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;</div>
<div class="line"><a name="l01091"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab88782cd2d5c77bb14d6a17baf7c49bc"> 1091</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab88782cd2d5c77bb14d6a17baf7c49bc">Insert</a> (<span class="keywordtype">object</span> obj, <span class="keywordtype">string</span> extra, Type objType)</div>
<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;        {</div>
<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;            <span class="keywordflow">if</span> (obj == null || objType == null) {</div>
<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;            }</div>
<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;            </div>
<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (objType);</div>
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;</div>
<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;            var replacing = string.Compare (extra, <span class="stringliteral">&quot;OR REPLACE&quot;</span>, StringComparison.OrdinalIgnoreCase) == 0;</div>
<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;            </div>
<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;            var cols = replacing ? map.InsertOrReplaceColumns : map.InsertColumns;</div>
<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;            var vals = <span class="keyword">new</span> <span class="keywordtype">object</span>[cols.Length];</div>
<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;            <span class="keywordflow">for</span> (var i = 0; i &lt; vals.Length; i++) {</div>
<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;                vals [i] = cols [i].GetValue (obj);</div>
<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;            }</div>
<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;            </div>
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;            var insertCmd = map.GetInsertCommand (<span class="keyword">this</span>, extra);</div>
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;            var count = insertCmd.ExecuteNonQuery (vals);</div>
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;            </div>
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;            <span class="keywordflow">if</span> (map.HasAutoIncPK) {</div>
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;                var <span class="keywordtype">id</span> = SQLite3.LastInsertRowid (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a>);</div>
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;                map.SetAutoIncPK (obj, id);</div>
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;            }</div>
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;            </div>
<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160;            <span class="keywordflow">return</span> count;</div>
<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;        }</div>
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;</div>
<div class="line"><a name="l01129"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ae4effee772569a47256bcb5f8764eabc"> 1129</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ae4effee772569a47256bcb5f8764eabc">Update</a> (<span class="keywordtype">object</span> obj)</div>
<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;        {</div>
<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;            <span class="keywordflow">if</span> (obj == null) {</div>
<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;            }</div>
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ae4effee772569a47256bcb5f8764eabc">Update</a> (obj, obj.GetType ());</div>
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;        }</div>
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;</div>
<div class="line"><a name="l01151"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab474a534faebfec1288672ef4e4f2140"> 1151</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab474a534faebfec1288672ef4e4f2140">Update</a> (<span class="keywordtype">object</span> obj, Type objType)</div>
<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;        {</div>
<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;            <span class="keywordflow">if</span> (obj == null || objType == null) {</div>
<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;            }</div>
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;            </div>
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (objType);</div>
<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;            </div>
<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;            var pk = map.PK;</div>
<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;            </div>
<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;            <span class="keywordflow">if</span> (pk == null) {</div>
<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Cannot update &quot;</span> + map.TableName + <span class="stringliteral">&quot;: it has no PK&quot;</span>);</div>
<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;            }</div>
<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;            </div>
<div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;            var cols = from p in map.Columns</div>
<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;                where p != pk</div>
<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;                select p;</div>
<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;            var vals = from c in cols</div>
<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;                select c.GetValue (obj);</div>
<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;            var ps = <span class="keyword">new</span> List&lt;object&gt; (vals);</div>
<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;            ps.Add (pk.GetValue (obj));</div>
<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;            var q = string.Format (<span class="stringliteral">&quot;update \&quot;{0}\&quot; set {1} where {2} = ? &quot;</span>, map.TableName, string.Join (<span class="stringliteral">&quot;,&quot;</span>, (from c in cols</div>
<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;                select <span class="stringliteral">&quot;\&quot;&quot;</span> + c.Name + <span class="stringliteral">&quot;\&quot; = ? &quot;</span>).ToArray ()), pk.Name);</div>
<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (q, ps.ToArray ());</div>
<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;        }</div>
<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;</div>
<div class="line"><a name="l01186"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1a95399fe5d61f8bbb56e36eac38d467"> 1186</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1a95399fe5d61f8bbb56e36eac38d467">UpdateAll</a> (System.Collections.IEnumerable objects)</div>
<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;        {</div>
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;            var c = 0;</div>
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">RunInTransaction</a> (() =&gt; {</div>
<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;                <span class="keywordflow">foreach</span> (var r <span class="keywordflow">in</span> objects) {</div>
<div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;                    c += <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ae4effee772569a47256bcb5f8764eabc">Update</a> (r);</div>
<div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;                }</div>
<div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160;            });</div>
<div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160;            <span class="keywordflow">return</span> c;</div>
<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160;        }</div>
<div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>&#160;</div>
<div class="line"><a name="l01206"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a55234164e36bc4abcb086e197f25e436"> 1206</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a55234164e36bc4abcb086e197f25e436">Delete</a> (<span class="keywordtype">object</span> objectToDelete)</div>
<div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;        {</div>
<div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (objectToDelete.GetType ());</div>
<div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;            var pk = map.PK;</div>
<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;            <span class="keywordflow">if</span> (pk == null) {</div>
<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Cannot delete &quot;</span> + map.TableName + <span class="stringliteral">&quot;: it has no PK&quot;</span>);</div>
<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160;            }</div>
<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;            var q = string.Format (<span class="stringliteral">&quot;delete from \&quot;{0}\&quot; where \&quot;{1}\&quot; = ?&quot;</span>, map.TableName, pk.Name);</div>
<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (q, pk.GetValue (objectToDelete));</div>
<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;        }</div>
<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160;</div>
<div class="line"><a name="l01229"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a0d4046198236b8c96b0bf50593f592a6"> 1229</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a0d4046198236b8c96b0bf50593f592a6">Delete&lt;T&gt;</a> (<span class="keywordtype">object</span> primaryKey)</div>
<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;        {</div>
<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (typeof (T));</div>
<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;            var pk = map.PK;</div>
<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160;            <span class="keywordflow">if</span> (pk == null) {</div>
<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Cannot delete &quot;</span> + map.TableName + <span class="stringliteral">&quot;: it has no PK&quot;</span>);</div>
<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160;            }</div>
<div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>&#160;            var q = string.Format (<span class="stringliteral">&quot;delete from \&quot;{0}\&quot; where \&quot;{1}\&quot; = ?&quot;</span>, map.TableName, pk.Name);</div>
<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (q, primaryKey);</div>
<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160;        }</div>
<div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;</div>
<div class="line"><a name="l01251"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#abed406a2cd17e1e360b79924a749b67c"> 1251</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#abed406a2cd17e1e360b79924a749b67c">DeleteAll&lt;T&gt;</a> ()</div>
<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160;        {</div>
<div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>&#160;            var map = <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">GetMapping</a> (typeof (T));</div>
<div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160;            var query = string.Format(<span class="stringliteral">&quot;delete from \&quot;{0}\&quot;&quot;</span>, map.TableName);</div>
<div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">Execute</a> (query);</div>
<div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>&#160;        }</div>
<div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160;</div>
<div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;        ~<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> ()</div>
<div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160;        {</div>
<div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160;        }</div>
<div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>&#160;</div>
<div class="line"><a name="l01263"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6"> 1263</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a> ()</div>
<div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160;        {</div>
<div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>&#160;            GC.SuppressFinalize (<span class="keyword">this</span>);</div>
<div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>&#160;        }</div>
<div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>&#160;</div>
<div class="line"><a name="l01269"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab5e33e84b34867c48d1578d2890ff7e7"> 1269</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ab5e33e84b34867c48d1578d2890ff7e7">Dispose</a> (<span class="keywordtype">bool</span> disposing)</div>
<div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160;        {</div>
<div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a74160304a4a218b7508220106eeb10d0">Close</a> ();</div>
<div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>&#160;        }</div>
<div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>&#160;</div>
<div class="line"><a name="l01274"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection.html#a74160304a4a218b7508220106eeb10d0"> 1274</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a74160304a4a218b7508220106eeb10d0">Close</a> ()</div>
<div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>&#160;        {</div>
<div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160;            <span class="keywordflow">if</span> (_open &amp;&amp; <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a> != NullHandle) {</div>
<div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160;                <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>&#160;                    <span class="keywordflow">if</span> (_mappings != null) {</div>
<div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>&#160;                        <span class="keywordflow">foreach</span> (var sqlInsertCommand <span class="keywordflow">in</span> _mappings.Values) {</div>
<div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>&#160;                            sqlInsertCommand.Dispose();</div>
<div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160;                        }</div>
<div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>&#160;                    }</div>
<div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160;                    var r = SQLite3.Close (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a>);</div>
<div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160;                    <span class="keywordflow">if</span> (r != <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.OK) {</div>
<div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160;                        <span class="keywordtype">string</span> msg = SQLite3.GetErrmsg (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a>);</div>
<div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160;                        <span class="keywordflow">throw</span> SQLiteException.New (r, msg);</div>
<div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160;                    }</div>
<div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;                }</div>
<div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160;                <span class="keywordflow">finally</span> {</div>
<div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>&#160;                    <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">Handle</a> = NullHandle;</div>
<div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160;                    _open = <span class="keyword">false</span>;</div>
<div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160;                }</div>
<div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160;            }</div>
<div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160;        }</div>
<div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160;    }</div>
<div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;</div>
<div class="line"><a name="l01300"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_string.html"> 1300</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_s_q_lite_connection_string.html">SQLiteConnectionString</a></div>
<div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;    {</div>
<div class="line"><a name="l01302"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_string.html#aeafe2630ba2871c730f2ea6b7cbcc15a"> 1302</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> ConnectionString { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01303"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_string.html#aa5fb18dd049e2f5ca930f9023525734d"> 1303</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01304"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_string.html#a1736975db702ccd8375cc77949511ff3"> 1304</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">StoreDateTimeAsTicks</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>&#160;</div>
<div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>&#160;<span class="preprocessor">#if NETFX_CORE</span></div>
<div class="line"><a name="l01307"></a><span class="lineno"> 1307</span>&#160;<span class="preprocessor"></span>        <span class="keyword">static</span> readonly <span class="keywordtype">string</span> MetroStyleDataPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path;</div>
<div class="line"><a name="l01308"></a><span class="lineno"> 1308</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01309"></a><span class="lineno"> 1309</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l01310"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_connection_string.html#ae5ec4b3dabdbb7c581d0931382fb06ef"> 1310</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection_string.html#ae5ec4b3dabdbb7c581d0931382fb06ef">SQLiteConnectionString</a> (<span class="keywordtype">string</span> databasePath, <span class="keywordtype">bool</span> storeDateTimeAsTicks)</div>
<div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>&#160;        {</div>
<div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160;            ConnectionString = databasePath;</div>
<div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">StoreDateTimeAsTicks</a> = storeDateTimeAsTicks;</div>
<div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>&#160;</div>
<div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>&#160;<span class="preprocessor">#if NETFX_CORE</span></div>
<div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>&#160;<span class="preprocessor"></span>            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a> = System.IO.Path.Combine (MetroStyleDataPath, databasePath);</div>
<div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160;<span class="preprocessor"></span>            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">DatabasePath</a> = databasePath;</div>
<div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;    }</div>
<div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>&#160;</div>
<div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>&#160;    [AttributeUsage (AttributeTargets.Class)]</div>
<div class="line"><a name="l01324"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_attribute.html"> 1324</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_table_attribute.html">TableAttribute</a> : Attribute</div>
<div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>&#160;    {</div>
<div class="line"><a name="l01326"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_attribute.html#a74415d62264be7e853dbc29ce54c84cf"> 1326</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> Name { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160;</div>
<div class="line"><a name="l01328"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_attribute.html#aa1d302b1fb306a6f5fcbbf5116c9ac55"> 1328</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_attribute.html#aa1d302b1fb306a6f5fcbbf5116c9ac55">TableAttribute</a> (<span class="keywordtype">string</span> name)</div>
<div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160;        {</div>
<div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>&#160;            Name = name;</div>
<div class="line"><a name="l01331"></a><span class="lineno"> 1331</span>&#160;        }</div>
<div class="line"><a name="l01332"></a><span class="lineno"> 1332</span>&#160;    }</div>
<div class="line"><a name="l01333"></a><span class="lineno"> 1333</span>&#160;</div>
<div class="line"><a name="l01334"></a><span class="lineno"> 1334</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01335"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_column_attribute.html"> 1335</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_column_attribute.html">ColumnAttribute</a> : Attribute</div>
<div class="line"><a name="l01336"></a><span class="lineno"> 1336</span>&#160;    {</div>
<div class="line"><a name="l01337"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_column_attribute.html#af2e6c8ab9f0b1ce7f10ea75346f9b3c8"> 1337</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> Name { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01338"></a><span class="lineno"> 1338</span>&#160;</div>
<div class="line"><a name="l01339"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_column_attribute.html#aa7ecb3d322d1fde710f51558b314ad6f"> 1339</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_column_attribute.html#aa7ecb3d322d1fde710f51558b314ad6f">ColumnAttribute</a> (<span class="keywordtype">string</span> name)</div>
<div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>&#160;        {</div>
<div class="line"><a name="l01341"></a><span class="lineno"> 1341</span>&#160;            Name = name;</div>
<div class="line"><a name="l01342"></a><span class="lineno"> 1342</span>&#160;        }</div>
<div class="line"><a name="l01343"></a><span class="lineno"> 1343</span>&#160;    }</div>
<div class="line"><a name="l01344"></a><span class="lineno"> 1344</span>&#160;</div>
<div class="line"><a name="l01345"></a><span class="lineno"> 1345</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01346"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_primary_key_attribute.html"> 1346</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_primary_key_attribute.html">PrimaryKeyAttribute</a> : Attribute</div>
<div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>&#160;    {</div>
<div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>&#160;    }</div>
<div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>&#160;</div>
<div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01351"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_auto_increment_attribute.html"> 1351</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_auto_increment_attribute.html">AutoIncrementAttribute</a> : Attribute</div>
<div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160;    {</div>
<div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;    }</div>
<div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160;</div>
<div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01356"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_indexed_attribute.html"> 1356</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_indexed_attribute.html">IndexedAttribute</a> : Attribute</div>
<div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160;    {</div>
<div class="line"><a name="l01358"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_indexed_attribute.html#a55689d97d0aca7c218c9677b2ddf2dd0"> 1358</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> Name { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01359"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_indexed_attribute.html#a5d6a42950339c3ae6060c1065467277a"> 1359</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> Order { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01360"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_indexed_attribute.html#a081cfea90b6aba263fb1b02c4897638a"> 1360</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> Unique { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>&#160;        </div>
<div class="line"><a name="l01362"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_indexed_attribute.html#a4c01c07e1c18a6d4743316c5f0760a34"> 1362</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_indexed_attribute.html#a4c01c07e1c18a6d4743316c5f0760a34">IndexedAttribute</a>()</div>
<div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>&#160;        {</div>
<div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>&#160;        }</div>
<div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160;        </div>
<div class="line"><a name="l01366"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_indexed_attribute.html#a6d43155fc211d6c76d27326c66c39752"> 1366</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_indexed_attribute.html#a6d43155fc211d6c76d27326c66c39752">IndexedAttribute</a>(<span class="keywordtype">string</span> name, <span class="keywordtype">int</span> order)</div>
<div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>&#160;        {</div>
<div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>&#160;            Name = name;</div>
<div class="line"><a name="l01369"></a><span class="lineno"> 1369</span>&#160;            Order = order;</div>
<div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>&#160;        }</div>
<div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>&#160;    }</div>
<div class="line"><a name="l01372"></a><span class="lineno"> 1372</span>&#160;</div>
<div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01374"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_ignore_attribute.html"> 1374</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_ignore_attribute.html">IgnoreAttribute</a> : Attribute</div>
<div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>&#160;    {</div>
<div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>&#160;    }</div>
<div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>&#160;</div>
<div class="line"><a name="l01378"></a><span class="lineno"> 1378</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01379"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_unique_attribute.html"> 1379</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_unique_attribute.html">UniqueAttribute</a> : <a class="code" href="class_s_q_lite_1_1_indexed_attribute.html">IndexedAttribute</a></div>
<div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>&#160;    {</div>
<div class="line"><a name="l01381"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_unique_attribute.html#a7be9750f13a84999b4a53c45b1f84250"> 1381</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">bool</span> Unique {</div>
<div class="line"><a name="l01382"></a><span class="lineno"> 1382</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
<div class="line"><a name="l01383"></a><span class="lineno"> 1383</span>&#160;            set { <span class="comment">/* throw?  */</span> }</div>
<div class="line"><a name="l01384"></a><span class="lineno"> 1384</span>&#160;        }</div>
<div class="line"><a name="l01385"></a><span class="lineno"> 1385</span>&#160;    }</div>
<div class="line"><a name="l01386"></a><span class="lineno"> 1386</span>&#160;</div>
<div class="line"><a name="l01387"></a><span class="lineno"> 1387</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01388"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_max_length_attribute.html"> 1388</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_max_length_attribute.html">MaxLengthAttribute</a> : Attribute</div>
<div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>&#160;    {</div>
<div class="line"><a name="l01390"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_max_length_attribute.html#afef968d0d949c2f95b78a07975284f5e"> 1390</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> Value { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01391"></a><span class="lineno"> 1391</span>&#160;</div>
<div class="line"><a name="l01392"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_max_length_attribute.html#ade550746d23ce2d766d0e1debe57c606"> 1392</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_max_length_attribute.html#ade550746d23ce2d766d0e1debe57c606">MaxLengthAttribute</a> (<span class="keywordtype">int</span> length)</div>
<div class="line"><a name="l01393"></a><span class="lineno"> 1393</span>&#160;        {</div>
<div class="line"><a name="l01394"></a><span class="lineno"> 1394</span>&#160;            Value = length;</div>
<div class="line"><a name="l01395"></a><span class="lineno"> 1395</span>&#160;        }</div>
<div class="line"><a name="l01396"></a><span class="lineno"> 1396</span>&#160;    }</div>
<div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>&#160;</div>
<div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>&#160;    [AttributeUsage (AttributeTargets.Property)]</div>
<div class="line"><a name="l01399"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_collation_attribute.html"> 1399</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_collation_attribute.html">CollationAttribute</a>: Attribute</div>
<div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>&#160;    {</div>
<div class="line"><a name="l01401"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_collation_attribute.html#af43921410271a15d87f6c97cf42971b3"> 1401</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> Value { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01402"></a><span class="lineno"> 1402</span>&#160;</div>
<div class="line"><a name="l01403"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_collation_attribute.html#a741b7b18adbbefa4c7922d254c8a3afc"> 1403</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_collation_attribute.html#a741b7b18adbbefa4c7922d254c8a3afc">CollationAttribute</a> (<span class="keywordtype">string</span> collation)</div>
<div class="line"><a name="l01404"></a><span class="lineno"> 1404</span>&#160;        {</div>
<div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>&#160;            Value = collation;</div>
<div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>&#160;        }</div>
<div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;    }</div>
<div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;</div>
<div class="line"><a name="l01409"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html"> 1409</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a></div>
<div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>&#160;    {</div>
<div class="line"><a name="l01411"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a33ac15671e4d3371a8fa2834d17fb8e8"> 1411</a></span>&#160;        <span class="keyword">public</span> Type MappedType { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>&#160;</div>
<div class="line"><a name="l01413"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#aa4f8f4620985ceca6db33ab061649f29"> 1413</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> TableName { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>&#160;</div>
<div class="line"><a name="l01415"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#ae108c0714634387100fccf5001b73672"> 1415</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a>[] Columns { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>&#160;</div>
<div class="line"><a name="l01417"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a322b91d1a0085e98355a830c970aee05"> 1417</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a> PK { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>&#160;</div>
<div class="line"><a name="l01419"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#acf2d379f40ca0ac2cfa6204a1d50e201"> 1419</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> GetByPrimaryKeySql { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>&#160;</div>
<div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>&#160;        Column _autoPk = null;</div>
<div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>&#160;        Column[] _insertColumns = null;</div>
<div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>&#160;        Column[] _insertOrReplaceColumns = null;</div>
<div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>&#160;</div>
<div class="line"><a name="l01425"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a57758525caf3216677a9474721630ecb"> 1425</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping.html#a57758525caf3216677a9474721630ecb">TableMapping</a> (Type type)</div>
<div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160;        {</div>
<div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>&#160;            MappedType = type;</div>
<div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>&#160;</div>
<div class="line"><a name="l01429"></a><span class="lineno"> 1429</span>&#160;<span class="preprocessor">#if NETFX_CORE</span></div>
<div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>&#160;<span class="preprocessor"></span>            var tableAttr = (<a class="code" href="class_s_q_lite_1_1_table_attribute.html">TableAttribute</a>)System.Reflection.CustomAttributeExtensions</div>
<div class="line"><a name="l01431"></a><span class="lineno"> 1431</span>&#160;                .GetCustomAttribute(type.GetTypeInfo(), typeof(<a class="code" href="class_s_q_lite_1_1_table_attribute.html">TableAttribute</a>), <span class="keyword">true</span>);</div>
<div class="line"><a name="l01432"></a><span class="lineno"> 1432</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>&#160;<span class="preprocessor"></span>            var tableAttr = (<a class="code" href="class_s_q_lite_1_1_table_attribute.html">TableAttribute</a>)type.GetCustomAttributes (typeof (<a class="code" href="class_s_q_lite_1_1_table_attribute.html">TableAttribute</a>), <span class="keyword">true</span>).FirstOrDefault ();</div>
<div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>&#160;            TableName = tableAttr != null ? tableAttr.Name : MappedType.Name;</div>
<div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160;</div>
<div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>&#160;<span class="preprocessor"></span>            var props = MappedType.GetProperties (BindingFlags.Public | BindingFlags.Instance | BindingFlags.SetProperty);</div>
<div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>&#160;<span class="preprocessor"></span>            var props = from p in MappedType.GetRuntimeProperties()</div>
<div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>&#160;                        where ((p.GetMethod != null &amp;&amp; p.GetMethod.IsPublic) || (p.SetMethod != null &amp;&amp; p.SetMethod.IsPublic) || (p.GetMethod != null &amp;&amp; p.GetMethod.IsStatic) || (p.SetMethod != null &amp;&amp; p.SetMethod.IsStatic))</div>
<div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>&#160;                        select p;</div>
<div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>&#160;<span class="preprocessor"></span>            var cols = <span class="keyword">new</span> List&lt;Column&gt; ();</div>
<div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>&#160;            <span class="keywordflow">foreach</span> (var p <span class="keywordflow">in</span> props) {</div>
<div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01448"></a><span class="lineno"> 1448</span>&#160;<span class="preprocessor"></span>                var ignore = p.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_ignore_attribute.html">IgnoreAttribute</a>), <span class="keyword">true</span>).Length &gt; 0;</div>
<div class="line"><a name="l01449"></a><span class="lineno"> 1449</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01450"></a><span class="lineno"> 1450</span>&#160;<span class="preprocessor"></span>                var ignore = p.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_ignore_attribute.html">IgnoreAttribute</a>), <span class="keyword">true</span>).Count() &gt; 0;</div>
<div class="line"><a name="l01451"></a><span class="lineno"> 1451</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>&#160;<span class="preprocessor"></span>                <span class="keywordflow">if</span> (p.CanWrite &amp;&amp; !ignore) {</div>
<div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>&#160;                    cols.Add (<span class="keyword">new</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a> (p));</div>
<div class="line"><a name="l01454"></a><span class="lineno"> 1454</span>&#160;                }</div>
<div class="line"><a name="l01455"></a><span class="lineno"> 1455</span>&#160;            }</div>
<div class="line"><a name="l01456"></a><span class="lineno"> 1456</span>&#160;            Columns = cols.ToArray ();</div>
<div class="line"><a name="l01457"></a><span class="lineno"> 1457</span>&#160;            <span class="keywordflow">foreach</span> (var c <span class="keywordflow">in</span> Columns) {</div>
<div class="line"><a name="l01458"></a><span class="lineno"> 1458</span>&#160;                <span class="keywordflow">if</span> (c.IsAutoInc &amp;&amp; c.IsPK) {</div>
<div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>&#160;                    _autoPk = c;</div>
<div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>&#160;                }</div>
<div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>&#160;                <span class="keywordflow">if</span> (c.IsPK) {</div>
<div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>&#160;                    PK = c;</div>
<div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>&#160;                }</div>
<div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;            }</div>
<div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160;            </div>
<div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>&#160;            HasAutoIncPK = _autoPk != null;</div>
<div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;</div>
<div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>&#160;            <span class="keywordflow">if</span> (PK != null) {</div>
<div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;                GetByPrimaryKeySql = string.Format (<span class="stringliteral">&quot;select * from \&quot;{0}\&quot; where \&quot;{1}\&quot; = ?&quot;</span>, TableName, PK.Name);</div>
<div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160;            }</div>
<div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>&#160;            <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>&#160;                <span class="comment">// People should not be calling Get/Find without a PK</span></div>
<div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>&#160;                GetByPrimaryKeySql = string.Format (<span class="stringliteral">&quot;select * from \&quot;{0}\&quot; limit 1&quot;</span>, TableName);</div>
<div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>&#160;            }</div>
<div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160;        }</div>
<div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160;</div>
<div class="line"><a name="l01477"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a93b2497900e37cb5ef4a32597934020e"> 1477</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> HasAutoIncPK { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;</div>
<div class="line"><a name="l01479"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a02f2ce7280201f572621b75e106add15"> 1479</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_table_mapping.html#a02f2ce7280201f572621b75e106add15">SetAutoIncPK</a> (<span class="keywordtype">object</span> obj, <span class="keywordtype">long</span> <span class="keywordtype">id</span>)</div>
<div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;        {</div>
<div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160;            <span class="keywordflow">if</span> (_autoPk != null) {</div>
<div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>&#160;                _autoPk.SetValue (obj, Convert.ChangeType (id, _autoPk.ColumnType, null));</div>
<div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>&#160;            }</div>
<div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>&#160;        }</div>
<div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>&#160;</div>
<div class="line"><a name="l01486"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a07daa9501f45c3a52cd834cb65fa86a2"> 1486</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a>[] InsertColumns {</div>
<div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>&#160;            <span class="keyword">get</span> {</div>
<div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>&#160;                <span class="keywordflow">if</span> (_insertColumns == null) {</div>
<div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>&#160;                    _insertColumns = Columns.Where (c =&gt; !c.IsAutoInc).ToArray ();</div>
<div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>&#160;                }</div>
<div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>&#160;                <span class="keywordflow">return</span> _insertColumns;</div>
<div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>&#160;            }</div>
<div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160;        }</div>
<div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160;</div>
<div class="line"><a name="l01495"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#ac88c964d9ed3ad2c6827ccfbe8765187"> 1495</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a>[] InsertOrReplaceColumns {</div>
<div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;            <span class="keyword">get</span> {</div>
<div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;                <span class="keywordflow">if</span> (_insertOrReplaceColumns == null) {</div>
<div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;                    _insertOrReplaceColumns = Columns.ToArray ();</div>
<div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;                }</div>
<div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;                <span class="keywordflow">return</span> _insertOrReplaceColumns;</div>
<div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;            }</div>
<div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;        }</div>
<div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;</div>
<div class="line"><a name="l01504"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#ab71131c8ed49c2c5276a555af0d564f2"> 1504</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a> <a class="code" href="class_s_q_lite_1_1_table_mapping.html#ab71131c8ed49c2c5276a555af0d564f2">FindColumnWithPropertyName</a> (<span class="keywordtype">string</span> propertyName)</div>
<div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;        {</div>
<div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;            var exact = Columns.Where (c =&gt; c.PropertyName == propertyName).FirstOrDefault ();</div>
<div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;            <span class="keywordflow">return</span> exact;</div>
<div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;        }</div>
<div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;</div>
<div class="line"><a name="l01510"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a1b6aca5cdaa9c0f8b6f5c1ecbb12affc"> 1510</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a> <a class="code" href="class_s_q_lite_1_1_table_mapping.html#a1b6aca5cdaa9c0f8b6f5c1ecbb12affc">FindColumn</a> (<span class="keywordtype">string</span> columnName)</div>
<div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;        {</div>
<div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;            var exact = Columns.Where (c =&gt; c.Name == columnName).FirstOrDefault ();</div>
<div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>&#160;            <span class="keywordflow">return</span> exact;</div>
<div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;        }</div>
<div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;        </div>
<div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;        <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html">PreparedSqlLiteInsertCommand</a> _insertCommand;</div>
<div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;        <span class="keywordtype">string</span> _insertCommandExtra = null;</div>
<div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;</div>
<div class="line"><a name="l01519"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping.html#a858d8d3031d8fca47fbc24a0bc752177"> 1519</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html">PreparedSqlLiteInsertCommand</a> <a class="code" href="class_s_q_lite_1_1_table_mapping.html#a858d8d3031d8fca47fbc24a0bc752177">GetInsertCommand</a>(<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> conn, <span class="keywordtype">string</span> extra)</div>
<div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;        {</div>
<div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;            <span class="keywordflow">if</span> (_insertCommand == null) {</div>
<div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;                _insertCommand = CreateInsertCommand(conn, extra);</div>
<div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>&#160;                _insertCommandExtra = extra;</div>
<div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>&#160;            }</div>
<div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (_insertCommandExtra != extra) {</div>
<div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>&#160;                _insertCommand.Dispose();</div>
<div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>&#160;                _insertCommand = CreateInsertCommand(conn, extra);</div>
<div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>&#160;                _insertCommandExtra = extra;</div>
<div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>&#160;            }</div>
<div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160;            <span class="keywordflow">return</span> _insertCommand;</div>
<div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160;        }</div>
<div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160;        </div>
<div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>&#160;        <span class="keyword">private</span> <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html">PreparedSqlLiteInsertCommand</a> CreateInsertCommand(<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> conn, <span class="keywordtype">string</span> extra)</div>
<div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>&#160;        {</div>
<div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>&#160;            var cols = InsertColumns;</div>
<div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>&#160;            <span class="keywordtype">string</span> insertSql;</div>
<div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>&#160;            <span class="keywordflow">if</span> (!cols.Any() &amp;&amp; Columns.Count() == 1 &amp;&amp; Columns[0].IsAutoInc)</div>
<div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>&#160;            {</div>
<div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160;                insertSql = string.Format(<span class="stringliteral">&quot;insert {1} into \&quot;{0}\&quot; default values&quot;</span>, TableName, extra);</div>
<div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160;            }</div>
<div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>&#160;            {</div>
<div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>&#160;                var replacing = string.Compare (extra, <span class="stringliteral">&quot;OR REPLACE&quot;</span>, StringComparison.OrdinalIgnoreCase) == 0;</div>
<div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>&#160;</div>
<div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>&#160;                <span class="keywordflow">if</span> (replacing) {</div>
<div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>&#160;                    cols = InsertOrReplaceColumns;</div>
<div class="line"><a name="l01547"></a><span class="lineno"> 1547</span>&#160;                }</div>
<div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>&#160;</div>
<div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>&#160;                insertSql = string.Format(<span class="stringliteral">&quot;insert {3} into \&quot;{0}\&quot;({1}) values ({2})&quot;</span>, TableName,</div>
<div class="line"><a name="l01550"></a><span class="lineno"> 1550</span>&#160;                                   string.Join(<span class="stringliteral">&quot;,&quot;</span>, (from c in cols</div>
<div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>&#160;                                                     select <span class="stringliteral">&quot;\&quot;&quot;</span> + c.Name + <span class="stringliteral">&quot;\&quot;&quot;</span>).ToArray()),</div>
<div class="line"><a name="l01552"></a><span class="lineno"> 1552</span>&#160;                                   <span class="keywordtype">string</span>.Join(<span class="stringliteral">&quot;,&quot;</span>, (from c in cols</div>
<div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>&#160;                                                     select <span class="stringliteral">&quot;?&quot;</span>).ToArray()), extra);</div>
<div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160;                </div>
<div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160;            }</div>
<div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;            </div>
<div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160;            var insertCommand = <span class="keyword">new</span> PreparedSqlLiteInsertCommand(conn);</div>
<div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160;            insertCommand.CommandText = insertSql;</div>
<div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>&#160;            <span class="keywordflow">return</span> insertCommand;</div>
<div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>&#160;        }</div>
<div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>&#160;        </div>
<div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>&#160;        <span class="keyword">protected</span> <span class="keyword">internal</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a>()</div>
<div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>&#160;        {</div>
<div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>&#160;            <span class="keywordflow">if</span> (_insertCommand != null) {</div>
<div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>&#160;                _insertCommand.Dispose();</div>
<div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>&#160;                _insertCommand = null;</div>
<div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>&#160;            }</div>
<div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>&#160;        }</div>
<div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>&#160;</div>
<div class="line"><a name="l01570"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html"> 1570</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">Column</a></div>
<div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>&#160;        {</div>
<div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>&#160;            PropertyInfo _prop;</div>
<div class="line"><a name="l01573"></a><span class="lineno"> 1573</span>&#160;</div>
<div class="line"><a name="l01574"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a95c3ae2c8502cb3074751fbfee766bb0"> 1574</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> Name { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01575"></a><span class="lineno"> 1575</span>&#160;</div>
<div class="line"><a name="l01576"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#af4b9a6b1eddbba6a9ec9dc2f9a8b6820"> 1576</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> PropertyName { <span class="keyword">get</span> { <span class="keywordflow">return</span> _prop.Name; } }</div>
<div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>&#160;</div>
<div class="line"><a name="l01578"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#afb3b922b5b0eb59eb826bb26b9838d61"> 1578</a></span>&#160;            <span class="keyword">public</span> Type ColumnType { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>&#160;</div>
<div class="line"><a name="l01580"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a6d8ba39bedd7336a17c5271479c7bb5a"> 1580</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> Collation { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>&#160;</div>
<div class="line"><a name="l01582"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a8cdcb1406f9ef7472b829f34c1f96360"> 1582</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> IsAutoInc { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>&#160;</div>
<div class="line"><a name="l01584"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a74b6f353e1632310fa12414e36407c50"> 1584</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> IsPK { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01585"></a><span class="lineno"> 1585</span>&#160;</div>
<div class="line"><a name="l01586"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a5153b02c01f808c46d83f1bccc23aa40"> 1586</a></span>&#160;            <span class="keyword">public</span> IEnumerable&lt;IndexedAttribute&gt; Indices { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01587"></a><span class="lineno"> 1587</span>&#160;</div>
<div class="line"><a name="l01588"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a2ff8d12dcf449ca9407c4c3222521c96"> 1588</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> IsNullable { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01589"></a><span class="lineno"> 1589</span>&#160;</div>
<div class="line"><a name="l01590"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a762d97a3a799c0f7a31b034eb0f3db71"> 1590</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">int</span> MaxStringLength { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l01591"></a><span class="lineno"> 1591</span>&#160;</div>
<div class="line"><a name="l01592"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a332cee07dfb8fa137dece836bd9dd0ad"> 1592</a></span>&#160;            <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a332cee07dfb8fa137dece836bd9dd0ad">Column</a> (PropertyInfo prop)</div>
<div class="line"><a name="l01593"></a><span class="lineno"> 1593</span>&#160;            {</div>
<div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>&#160;                var colAttr = (<a class="code" href="class_s_q_lite_1_1_column_attribute.html">ColumnAttribute</a>)prop.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_column_attribute.html">ColumnAttribute</a>), <span class="keyword">true</span>).FirstOrDefault ();</div>
<div class="line"><a name="l01595"></a><span class="lineno"> 1595</span>&#160;</div>
<div class="line"><a name="l01596"></a><span class="lineno"> 1596</span>&#160;                _prop = prop;</div>
<div class="line"><a name="l01597"></a><span class="lineno"> 1597</span>&#160;                Name = colAttr == null ? prop.Name : colAttr.Name;</div>
<div class="line"><a name="l01598"></a><span class="lineno"> 1598</span>&#160;                <span class="comment">//If this type is Nullable&lt;T&gt; then Nullable.GetUnderlyingType returns the T, otherwise it returns null, so get the the actual type instead</span></div>
<div class="line"><a name="l01599"></a><span class="lineno"> 1599</span>&#160;                ColumnType = Nullable.GetUnderlyingType(prop.PropertyType) ?? prop.PropertyType;</div>
<div class="line"><a name="l01600"></a><span class="lineno"> 1600</span>&#160;                Collation = <a class="code" href="class_s_q_lite_1_1_orm.html">Orm</a>.<a class="code" href="class_s_q_lite_1_1_orm.html#a57da9f36b0a6b357dc1cec41b855b637">Collation</a> (prop);</div>
<div class="line"><a name="l01601"></a><span class="lineno"> 1601</span>&#160;                IsAutoInc = Orm.IsAutoInc (prop);</div>
<div class="line"><a name="l01602"></a><span class="lineno"> 1602</span>&#160;                IsPK = Orm.IsPK (prop);</div>
<div class="line"><a name="l01603"></a><span class="lineno"> 1603</span>&#160;                Indices = Orm.GetIndices(prop);</div>
<div class="line"><a name="l01604"></a><span class="lineno"> 1604</span>&#160;                IsNullable = !IsPK;</div>
<div class="line"><a name="l01605"></a><span class="lineno"> 1605</span>&#160;                MaxStringLength = Orm.MaxStringLength (prop);</div>
<div class="line"><a name="l01606"></a><span class="lineno"> 1606</span>&#160;            }</div>
<div class="line"><a name="l01607"></a><span class="lineno"> 1607</span>&#160;</div>
<div class="line"><a name="l01608"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a0f57d48181580599bd9b4aa6db68687c"> 1608</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a0f57d48181580599bd9b4aa6db68687c">SetValue</a> (<span class="keywordtype">object</span> obj, <span class="keywordtype">object</span> val)</div>
<div class="line"><a name="l01609"></a><span class="lineno"> 1609</span>&#160;            {</div>
<div class="line"><a name="l01610"></a><span class="lineno"> 1610</span>&#160;                _prop.SetValue (obj, val, null);</div>
<div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>&#160;            }</div>
<div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>&#160;</div>
<div class="line"><a name="l01613"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#ac2e9f8110d390d1fa630ebb0d345c293"> 1613</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">object</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html#ac2e9f8110d390d1fa630ebb0d345c293">GetValue</a> (<span class="keywordtype">object</span> obj)</div>
<div class="line"><a name="l01614"></a><span class="lineno"> 1614</span>&#160;            {</div>
<div class="line"><a name="l01615"></a><span class="lineno"> 1615</span>&#160;                <span class="keywordflow">return</span> _prop.GetValue (obj, null);</div>
<div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>&#160;            }</div>
<div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>&#160;        }</div>
<div class="line"><a name="l01618"></a><span class="lineno"> 1618</span>&#160;    }</div>
<div class="line"><a name="l01619"></a><span class="lineno"> 1619</span>&#160;</div>
<div class="line"><a name="l01620"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html"> 1620</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_orm.html">Orm</a></div>
<div class="line"><a name="l01621"></a><span class="lineno"> 1621</span>&#160;    {</div>
<div class="line"><a name="l01622"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#a8125a8e7629bbfc0e6daa8f6c2f51f74"> 1622</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">const</span> <span class="keywordtype">int</span> DefaultMaxStringLength = 140;</div>
<div class="line"><a name="l01623"></a><span class="lineno"> 1623</span>&#160;</div>
<div class="line"><a name="l01624"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#adb6d510f2918202a99622c34f8b2636c"> 1624</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_orm.html#adb6d510f2918202a99622c34f8b2636c">SqlDecl</a> (<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a>.Column p, <span class="keywordtype">bool</span> storeDateTimeAsTicks)</div>
<div class="line"><a name="l01625"></a><span class="lineno"> 1625</span>&#160;        {</div>
<div class="line"><a name="l01626"></a><span class="lineno"> 1626</span>&#160;            <span class="keywordtype">string</span> decl = <span class="stringliteral">&quot;\&quot;&quot;</span> + p.Name + <span class="stringliteral">&quot;\&quot; &quot;</span> + SqlType (p, storeDateTimeAsTicks) + <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l01627"></a><span class="lineno"> 1627</span>&#160;            </div>
<div class="line"><a name="l01628"></a><span class="lineno"> 1628</span>&#160;            <span class="keywordflow">if</span> (p.IsPK) {</div>
<div class="line"><a name="l01629"></a><span class="lineno"> 1629</span>&#160;                decl += <span class="stringliteral">&quot;primary key &quot;</span>;</div>
<div class="line"><a name="l01630"></a><span class="lineno"> 1630</span>&#160;            }</div>
<div class="line"><a name="l01631"></a><span class="lineno"> 1631</span>&#160;            <span class="keywordflow">if</span> (p.IsAutoInc) {</div>
<div class="line"><a name="l01632"></a><span class="lineno"> 1632</span>&#160;                decl += <span class="stringliteral">&quot;autoincrement &quot;</span>;</div>
<div class="line"><a name="l01633"></a><span class="lineno"> 1633</span>&#160;            }</div>
<div class="line"><a name="l01634"></a><span class="lineno"> 1634</span>&#160;            <span class="keywordflow">if</span> (!p.IsNullable) {</div>
<div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>&#160;                decl += <span class="stringliteral">&quot;not null &quot;</span>;</div>
<div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>&#160;            }</div>
<div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>&#160;            <span class="keywordflow">if</span> (!<span class="keywordtype">string</span>.IsNullOrEmpty (p.Collation)) {</div>
<div class="line"><a name="l01638"></a><span class="lineno"> 1638</span>&#160;                decl += <span class="stringliteral">&quot;collate &quot;</span> + p.Collation + <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l01639"></a><span class="lineno"> 1639</span>&#160;            }</div>
<div class="line"><a name="l01640"></a><span class="lineno"> 1640</span>&#160;            </div>
<div class="line"><a name="l01641"></a><span class="lineno"> 1641</span>&#160;            <span class="keywordflow">return</span> decl;</div>
<div class="line"><a name="l01642"></a><span class="lineno"> 1642</span>&#160;        }</div>
<div class="line"><a name="l01643"></a><span class="lineno"> 1643</span>&#160;</div>
<div class="line"><a name="l01644"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#a5243e3a4791a06448b358116676d8e98"> 1644</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_orm.html#a5243e3a4791a06448b358116676d8e98">SqlType</a> (<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a>.Column p, <span class="keywordtype">bool</span> storeDateTimeAsTicks)</div>
<div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>&#160;        {</div>
<div class="line"><a name="l01646"></a><span class="lineno"> 1646</span>&#160;            var clrType = p.ColumnType;</div>
<div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>&#160;            <span class="keywordflow">if</span> (clrType == typeof(Boolean) || clrType == typeof(Byte) || clrType == typeof(UInt16) || clrType == typeof(SByte) || clrType == typeof(Int16) || clrType == typeof(Int32)) {</div>
<div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;integer&quot;</span>;</div>
<div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(UInt32) || clrType == typeof(Int64)) {</div>
<div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;bigint&quot;</span>;</div>
<div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Single) || clrType == typeof(Double) || clrType == typeof(Decimal)) {</div>
<div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;float&quot;</span>;</div>
<div class="line"><a name="l01653"></a><span class="lineno"> 1653</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(String)) {</div>
<div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>&#160;                <span class="keywordtype">int</span> len = p.MaxStringLength;</div>
<div class="line"><a name="l01655"></a><span class="lineno"> 1655</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;varchar(&quot;</span> + len + <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l01656"></a><span class="lineno"> 1656</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(DateTime)) {</div>
<div class="line"><a name="l01657"></a><span class="lineno"> 1657</span>&#160;                <span class="keywordflow">return</span> storeDateTimeAsTicks ? <span class="stringliteral">&quot;bigint&quot;</span> : <span class="stringliteral">&quot;datetime&quot;</span>;</div>
<div class="line"><a name="l01658"></a><span class="lineno"> 1658</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01659"></a><span class="lineno"> 1659</span>&#160;<span class="preprocessor"></span>            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType.IsEnum) {</div>
<div class="line"><a name="l01660"></a><span class="lineno"> 1660</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>&#160;<span class="preprocessor"></span>            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType.GetTypeInfo().IsEnum) {</div>
<div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>&#160;<span class="preprocessor"></span>                <span class="keywordflow">return</span> <span class="stringliteral">&quot;integer&quot;</span>;</div>
<div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(byte[])) {</div>
<div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;blob&quot;</span>;</div>
<div class="line"><a name="l01666"></a><span class="lineno"> 1666</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Guid)) {</div>
<div class="line"><a name="l01667"></a><span class="lineno"> 1667</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;varchar(36)&quot;</span>;</div>
<div class="line"><a name="l01668"></a><span class="lineno"> 1668</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01669"></a><span class="lineno"> 1669</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Don&#39;t know about &quot;</span> + clrType);</div>
<div class="line"><a name="l01670"></a><span class="lineno"> 1670</span>&#160;            }</div>
<div class="line"><a name="l01671"></a><span class="lineno"> 1671</span>&#160;        }</div>
<div class="line"><a name="l01672"></a><span class="lineno"> 1672</span>&#160;</div>
<div class="line"><a name="l01673"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#ad270c1798dba02b61e14c2039070eeee"> 1673</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_orm.html#ad270c1798dba02b61e14c2039070eeee">IsPK</a> (MemberInfo p)</div>
<div class="line"><a name="l01674"></a><span class="lineno"> 1674</span>&#160;        {</div>
<div class="line"><a name="l01675"></a><span class="lineno"> 1675</span>&#160;            var attrs = p.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_primary_key_attribute.html">PrimaryKeyAttribute</a>), <span class="keyword">true</span>);</div>
<div class="line"><a name="l01676"></a><span class="lineno"> 1676</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01677"></a><span class="lineno"> 1677</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> attrs.Length &gt; 0;</div>
<div class="line"><a name="l01678"></a><span class="lineno"> 1678</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01679"></a><span class="lineno"> 1679</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> attrs.Count() &gt; 0;</div>
<div class="line"><a name="l01680"></a><span class="lineno"> 1680</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01681"></a><span class="lineno"> 1681</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l01682"></a><span class="lineno"> 1682</span>&#160;</div>
<div class="line"><a name="l01683"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#a57da9f36b0a6b357dc1cec41b855b637"> 1683</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_orm.html#a57da9f36b0a6b357dc1cec41b855b637">Collation</a> (MemberInfo p)</div>
<div class="line"><a name="l01684"></a><span class="lineno"> 1684</span>&#160;        {</div>
<div class="line"><a name="l01685"></a><span class="lineno"> 1685</span>&#160;            var attrs = p.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_collation_attribute.html">CollationAttribute</a>), <span class="keyword">true</span>);</div>
<div class="line"><a name="l01686"></a><span class="lineno"> 1686</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01687"></a><span class="lineno"> 1687</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">if</span> (attrs.Length &gt; 0) {</div>
<div class="line"><a name="l01688"></a><span class="lineno"> 1688</span>&#160;                <span class="keywordflow">return</span> ((<a class="code" href="class_s_q_lite_1_1_collation_attribute.html">CollationAttribute</a>)attrs [0]).Value;</div>
<div class="line"><a name="l01689"></a><span class="lineno"> 1689</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01690"></a><span class="lineno"> 1690</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">if</span> (attrs.Count() &gt; 0) {</div>
<div class="line"><a name="l01691"></a><span class="lineno"> 1691</span>&#160;                <span class="keywordflow">return</span> ((<a class="code" href="class_s_q_lite_1_1_collation_attribute.html">CollationAttribute</a>)attrs.First()).Value;</div>
<div class="line"><a name="l01692"></a><span class="lineno"> 1692</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01693"></a><span class="lineno"> 1693</span>&#160;<span class="preprocessor"></span>            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01694"></a><span class="lineno"> 1694</span>&#160;                <span class="keywordflow">return</span> string.Empty;</div>
<div class="line"><a name="l01695"></a><span class="lineno"> 1695</span>&#160;            }</div>
<div class="line"><a name="l01696"></a><span class="lineno"> 1696</span>&#160;        }</div>
<div class="line"><a name="l01697"></a><span class="lineno"> 1697</span>&#160;</div>
<div class="line"><a name="l01698"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#a895ae223b0511768682d43379fcf2f3e"> 1698</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_s_q_lite_1_1_orm.html#a895ae223b0511768682d43379fcf2f3e">IsAutoInc</a> (MemberInfo p)</div>
<div class="line"><a name="l01699"></a><span class="lineno"> 1699</span>&#160;        {</div>
<div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>&#160;            var attrs = p.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_auto_increment_attribute.html">AutoIncrementAttribute</a>), <span class="keyword">true</span>);</div>
<div class="line"><a name="l01701"></a><span class="lineno"> 1701</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01702"></a><span class="lineno"> 1702</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> attrs.Length &gt; 0;</div>
<div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01704"></a><span class="lineno"> 1704</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> attrs.Count() &gt; 0;</div>
<div class="line"><a name="l01705"></a><span class="lineno"> 1705</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01706"></a><span class="lineno"> 1706</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l01707"></a><span class="lineno"> 1707</span>&#160;</div>
<div class="line"><a name="l01708"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#a6dc5a789752e31c8d928d554e3256fca"> 1708</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> IEnumerable&lt;IndexedAttribute&gt; <a class="code" href="class_s_q_lite_1_1_orm.html#a6dc5a789752e31c8d928d554e3256fca">GetIndices</a>(MemberInfo p)</div>
<div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>&#160;        {</div>
<div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>&#160;            var attrs = p.GetCustomAttributes(typeof(<a class="code" href="class_s_q_lite_1_1_indexed_attribute.html">IndexedAttribute</a>), <span class="keyword">true</span>);</div>
<div class="line"><a name="l01711"></a><span class="lineno"> 1711</span>&#160;            <span class="keywordflow">return</span> attrs.Cast&lt;<a class="code" href="class_s_q_lite_1_1_indexed_attribute.html">IndexedAttribute</a>&gt;();</div>
<div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>&#160;        }</div>
<div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>&#160;        </div>
<div class="line"><a name="l01714"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_orm.html#a51f2ca22f2399618082849f30a699efd"> 1714</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_orm.html#a51f2ca22f2399618082849f30a699efd">MaxStringLength</a>(PropertyInfo p)</div>
<div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>&#160;        {</div>
<div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>&#160;            var attrs = p.GetCustomAttributes (typeof(<a class="code" href="class_s_q_lite_1_1_max_length_attribute.html">MaxLengthAttribute</a>), <span class="keyword">true</span>);</div>
<div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01718"></a><span class="lineno"> 1718</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">if</span> (attrs.Length &gt; 0) {</div>
<div class="line"><a name="l01719"></a><span class="lineno"> 1719</span>&#160;                <span class="keywordflow">return</span> ((<a class="code" href="class_s_q_lite_1_1_max_length_attribute.html">MaxLengthAttribute</a>)attrs [0]).Value;</div>
<div class="line"><a name="l01720"></a><span class="lineno"> 1720</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01721"></a><span class="lineno"> 1721</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">if</span> (attrs.Count() &gt; 0) {</div>
<div class="line"><a name="l01722"></a><span class="lineno"> 1722</span>&#160;                <span class="keywordflow">return</span> ((<a class="code" href="class_s_q_lite_1_1_max_length_attribute.html">MaxLengthAttribute</a>)attrs.First()).Value;</div>
<div class="line"><a name="l01723"></a><span class="lineno"> 1723</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01724"></a><span class="lineno"> 1724</span>&#160;<span class="preprocessor"></span>            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01725"></a><span class="lineno"> 1725</span>&#160;                <span class="keywordflow">return</span> DefaultMaxStringLength;</div>
<div class="line"><a name="l01726"></a><span class="lineno"> 1726</span>&#160;            }</div>
<div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>&#160;        }</div>
<div class="line"><a name="l01728"></a><span class="lineno"> 1728</span>&#160;    }</div>
<div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>&#160;</div>
<div class="line"><a name="l01730"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html"> 1730</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">partial class </span><a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html">SQLiteCommand</a></div>
<div class="line"><a name="l01731"></a><span class="lineno"> 1731</span>&#160;    {</div>
<div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>&#160;        <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> _conn;</div>
<div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>&#160;        <span class="keyword">private</span> List&lt;Binding&gt; _bindings;</div>
<div class="line"><a name="l01734"></a><span class="lineno"> 1734</span>&#160;</div>
<div class="line"><a name="l01735"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#aa0d35069590226d88b5c0e9c484160db"> 1735</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> CommandText { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01736"></a><span class="lineno"> 1736</span>&#160;</div>
<div class="line"><a name="l01737"></a><span class="lineno"> 1737</span>&#160;        <span class="keyword">internal</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html">SQLiteCommand</a> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> conn)</div>
<div class="line"><a name="l01738"></a><span class="lineno"> 1738</span>&#160;        {</div>
<div class="line"><a name="l01739"></a><span class="lineno"> 1739</span>&#160;            _conn = conn;</div>
<div class="line"><a name="l01740"></a><span class="lineno"> 1740</span>&#160;            _bindings = <span class="keyword">new</span> List&lt;Binding&gt; ();</div>
<div class="line"><a name="l01741"></a><span class="lineno"> 1741</span>&#160;            CommandText = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l01742"></a><span class="lineno"> 1742</span>&#160;        }</div>
<div class="line"><a name="l01743"></a><span class="lineno"> 1743</span>&#160;</div>
<div class="line"><a name="l01744"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a7a2b9afd67f691520b73bfb0efb18b9b"> 1744</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html#a7a2b9afd67f691520b73bfb0efb18b9b">ExecuteNonQuery</a> ()</div>
<div class="line"><a name="l01745"></a><span class="lineno"> 1745</span>&#160;        {</div>
<div class="line"><a name="l01746"></a><span class="lineno"> 1746</span>&#160;            <span class="keywordflow">if</span> (_conn.Trace) {</div>
<div class="line"><a name="l01747"></a><span class="lineno"> 1747</span>&#160;                Debug.WriteLine (<span class="stringliteral">&quot;Executing: &quot;</span> + <span class="keyword">this</span>);</div>
<div class="line"><a name="l01748"></a><span class="lineno"> 1748</span>&#160;            }</div>
<div class="line"><a name="l01749"></a><span class="lineno"> 1749</span>&#160;            </div>
<div class="line"><a name="l01750"></a><span class="lineno"> 1750</span>&#160;            var r = SQLite3.Result.OK;</div>
<div class="line"><a name="l01751"></a><span class="lineno"> 1751</span>&#160;            var stmt = Prepare ();</div>
<div class="line"><a name="l01752"></a><span class="lineno"> 1752</span>&#160;            r = SQLite3.Step (stmt);</div>
<div class="line"><a name="l01753"></a><span class="lineno"> 1753</span>&#160;            Finalize (stmt);</div>
<div class="line"><a name="l01754"></a><span class="lineno"> 1754</span>&#160;            <span class="keywordflow">if</span> (r == <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.Done) {</div>
<div class="line"><a name="l01755"></a><span class="lineno"> 1755</span>&#160;                <span class="keywordtype">int</span> rowsAffected = SQLite3.Changes (_conn.Handle);</div>
<div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>&#160;                <span class="keywordflow">return</span> rowsAffected;</div>
<div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.Error) {</div>
<div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>&#160;                <span class="keywordtype">string</span> msg = SQLite3.GetErrmsg (_conn.Handle);</div>
<div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (r, msg);</div>
<div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (r, r.ToString ());</div>
<div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;            }</div>
<div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;        }</div>
<div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>&#160;</div>
<div class="line"><a name="l01765"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a28f64ff5f495468d9f480bd5d1b4338d"> 1765</a></span>&#160;        <span class="keyword">public</span> IEnumerable&lt;T&gt; ExecuteDeferredQuery&lt;T&gt; ()</div>
<div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>&#160;        {</div>
<div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>&#160;            <span class="keywordflow">return</span> ExecuteDeferredQuery&lt;T&gt;(_conn.GetMapping(typeof(T)));</div>
<div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>&#160;        }</div>
<div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160;</div>
<div class="line"><a name="l01770"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a6aa1993738e35a863eea4c5d7cee212e"> 1770</a></span>&#160;        <span class="keyword">public</span> List&lt;T&gt; ExecuteQuery&lt;T&gt; ()</div>
<div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>&#160;        {</div>
<div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>&#160;            <span class="keywordflow">return</span> ExecuteDeferredQuery&lt;T&gt;(_conn.GetMapping(typeof(T))).ToList();</div>
<div class="line"><a name="l01773"></a><span class="lineno"> 1773</span>&#160;        }</div>
<div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>&#160;</div>
<div class="line"><a name="l01775"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a89a1919e9f583731eaabaf12e1982e39"> 1775</a></span>&#160;        <span class="keyword">public</span> List&lt;T&gt; ExecuteQuery&lt;T&gt; (<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map)</div>
<div class="line"><a name="l01776"></a><span class="lineno"> 1776</span>&#160;        {</div>
<div class="line"><a name="l01777"></a><span class="lineno"> 1777</span>&#160;            <span class="keywordflow">return</span> ExecuteDeferredQuery&lt;T&gt;(map).ToList();</div>
<div class="line"><a name="l01778"></a><span class="lineno"> 1778</span>&#160;        }</div>
<div class="line"><a name="l01779"></a><span class="lineno"> 1779</span>&#160;</div>
<div class="line"><a name="l01792"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a4761647a6b02f398aa1d7bbd1f090828"> 1792</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html#a4761647a6b02f398aa1d7bbd1f090828">OnInstanceCreated</a> (<span class="keywordtype">object</span> obj)</div>
<div class="line"><a name="l01793"></a><span class="lineno"> 1793</span>&#160;        {</div>
<div class="line"><a name="l01794"></a><span class="lineno"> 1794</span>&#160;            <span class="comment">// Can be overridden.</span></div>
<div class="line"><a name="l01795"></a><span class="lineno"> 1795</span>&#160;        }</div>
<div class="line"><a name="l01796"></a><span class="lineno"> 1796</span>&#160;</div>
<div class="line"><a name="l01797"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a092913169afcc6c9fdd9ae5e5ca7cf96"> 1797</a></span>&#160;        <span class="keyword">public</span> IEnumerable&lt;T&gt; ExecuteDeferredQuery&lt;T&gt; (<a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> map)</div>
<div class="line"><a name="l01798"></a><span class="lineno"> 1798</span>&#160;        {</div>
<div class="line"><a name="l01799"></a><span class="lineno"> 1799</span>&#160;            <span class="keywordflow">if</span> (_conn.Trace) {</div>
<div class="line"><a name="l01800"></a><span class="lineno"> 1800</span>&#160;                Debug.WriteLine (<span class="stringliteral">&quot;Executing Query: &quot;</span> + <span class="keyword">this</span>);</div>
<div class="line"><a name="l01801"></a><span class="lineno"> 1801</span>&#160;            }</div>
<div class="line"><a name="l01802"></a><span class="lineno"> 1802</span>&#160;</div>
<div class="line"><a name="l01803"></a><span class="lineno"> 1803</span>&#160;            var stmt = Prepare ();</div>
<div class="line"><a name="l01804"></a><span class="lineno"> 1804</span>&#160;            <span class="keywordflow">try</span></div>
<div class="line"><a name="l01805"></a><span class="lineno"> 1805</span>&#160;            {</div>
<div class="line"><a name="l01806"></a><span class="lineno"> 1806</span>&#160;                var cols = <span class="keyword">new</span> <a class="code" href="class_s_q_lite_1_1_table_mapping_1_1_column.html">TableMapping.Column</a>[SQLite3.ColumnCount (stmt)];</div>
<div class="line"><a name="l01807"></a><span class="lineno"> 1807</span>&#160;</div>
<div class="line"><a name="l01808"></a><span class="lineno"> 1808</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; cols.Length; i++) {</div>
<div class="line"><a name="l01809"></a><span class="lineno"> 1809</span>&#160;                    var name = SQLite3.ColumnName16 (stmt, i);</div>
<div class="line"><a name="l01810"></a><span class="lineno"> 1810</span>&#160;                    cols [i] = map.FindColumn (name);</div>
<div class="line"><a name="l01811"></a><span class="lineno"> 1811</span>&#160;                }</div>
<div class="line"><a name="l01812"></a><span class="lineno"> 1812</span>&#160;            </div>
<div class="line"><a name="l01813"></a><span class="lineno"> 1813</span>&#160;                <span class="keywordflow">while</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a39aad9b1b6a78224ce2ee2ac056895e4">Step</a> (stmt) == SQLite3.Result.Row) {</div>
<div class="line"><a name="l01814"></a><span class="lineno"> 1814</span>&#160;                    var obj = Activator.CreateInstance(map.MappedType);</div>
<div class="line"><a name="l01815"></a><span class="lineno"> 1815</span>&#160;                    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; cols.Length; i++) {</div>
<div class="line"><a name="l01816"></a><span class="lineno"> 1816</span>&#160;                        <span class="keywordflow">if</span> (cols [i] == null)</div>
<div class="line"><a name="l01817"></a><span class="lineno"> 1817</span>&#160;                            <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l01818"></a><span class="lineno"> 1818</span>&#160;                        var colType = SQLite3.ColumnType (stmt, i);</div>
<div class="line"><a name="l01819"></a><span class="lineno"> 1819</span>&#160;                        var val = ReadCol (stmt, i, colType, cols [i].ColumnType);</div>
<div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>&#160;                        cols [i].SetValue (obj, val);</div>
<div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>&#160;                    }</div>
<div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;                    OnInstanceCreated (obj);</div>
<div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>&#160;                    yield <span class="keywordflow">return</span> (T)obj;</div>
<div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>&#160;                }</div>
<div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>&#160;            }</div>
<div class="line"><a name="l01826"></a><span class="lineno"> 1826</span>&#160;            <span class="keywordflow">finally</span></div>
<div class="line"><a name="l01827"></a><span class="lineno"> 1827</span>&#160;            {</div>
<div class="line"><a name="l01828"></a><span class="lineno"> 1828</span>&#160;                SQLite3.Finalize(stmt);</div>
<div class="line"><a name="l01829"></a><span class="lineno"> 1829</span>&#160;            }</div>
<div class="line"><a name="l01830"></a><span class="lineno"> 1830</span>&#160;        }</div>
<div class="line"><a name="l01831"></a><span class="lineno"> 1831</span>&#160;</div>
<div class="line"><a name="l01832"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a3ce415ca55779eaf3d1851060eff05cc"> 1832</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#af88acbe7da213c81875c3a35a5d61337">ExecuteScalar&lt;T&gt;</a> ()</div>
<div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>&#160;        {</div>
<div class="line"><a name="l01834"></a><span class="lineno"> 1834</span>&#160;            <span class="keywordflow">if</span> (_conn.Trace) {</div>
<div class="line"><a name="l01835"></a><span class="lineno"> 1835</span>&#160;                Debug.WriteLine (<span class="stringliteral">&quot;Executing Query: &quot;</span> + <span class="keyword">this</span>);</div>
<div class="line"><a name="l01836"></a><span class="lineno"> 1836</span>&#160;            }</div>
<div class="line"><a name="l01837"></a><span class="lineno"> 1837</span>&#160;            </div>
<div class="line"><a name="l01838"></a><span class="lineno"> 1838</span>&#160;            T val = <span class="keywordflow">default</span>(T);</div>
<div class="line"><a name="l01839"></a><span class="lineno"> 1839</span>&#160;            </div>
<div class="line"><a name="l01840"></a><span class="lineno"> 1840</span>&#160;            var stmt = Prepare ();</div>
<div class="line"><a name="l01841"></a><span class="lineno"> 1841</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a39aad9b1b6a78224ce2ee2ac056895e4">Step</a> (stmt) == SQLite3.Result.Row) {</div>
<div class="line"><a name="l01842"></a><span class="lineno"> 1842</span>&#160;                var colType = SQLite3.ColumnType (stmt, 0);</div>
<div class="line"><a name="l01843"></a><span class="lineno"> 1843</span>&#160;                val = (T)ReadCol (stmt, 0, colType, typeof(T));</div>
<div class="line"><a name="l01844"></a><span class="lineno"> 1844</span>&#160;            }</div>
<div class="line"><a name="l01845"></a><span class="lineno"> 1845</span>&#160;            Finalize (stmt);</div>
<div class="line"><a name="l01846"></a><span class="lineno"> 1846</span>&#160;            </div>
<div class="line"><a name="l01847"></a><span class="lineno"> 1847</span>&#160;            <span class="keywordflow">return</span> val;</div>
<div class="line"><a name="l01848"></a><span class="lineno"> 1848</span>&#160;        }</div>
<div class="line"><a name="l01849"></a><span class="lineno"> 1849</span>&#160;</div>
<div class="line"><a name="l01850"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#adc2e4047e52cc3da0307a74e74e276f7"> 1850</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html#adc2e4047e52cc3da0307a74e74e276f7">Bind</a> (<span class="keywordtype">string</span> name, <span class="keywordtype">object</span> val)</div>
<div class="line"><a name="l01851"></a><span class="lineno"> 1851</span>&#160;        {</div>
<div class="line"><a name="l01852"></a><span class="lineno"> 1852</span>&#160;            _bindings.Add (<span class="keyword">new</span> Binding {</div>
<div class="line"><a name="l01853"></a><span class="lineno"> 1853</span>&#160;                Name = name,</div>
<div class="line"><a name="l01854"></a><span class="lineno"> 1854</span>&#160;                Value = val</div>
<div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>&#160;            });</div>
<div class="line"><a name="l01856"></a><span class="lineno"> 1856</span>&#160;        }</div>
<div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>&#160;</div>
<div class="line"><a name="l01858"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#afd03d0602268aef6f9300d60f6102265"> 1858</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html#afd03d0602268aef6f9300d60f6102265">Bind</a> (<span class="keywordtype">object</span> val)</div>
<div class="line"><a name="l01859"></a><span class="lineno"> 1859</span>&#160;        {</div>
<div class="line"><a name="l01860"></a><span class="lineno"> 1860</span>&#160;            Bind (null, val);</div>
<div class="line"><a name="l01861"></a><span class="lineno"> 1861</span>&#160;        }</div>
<div class="line"><a name="l01862"></a><span class="lineno"> 1862</span>&#160;</div>
<div class="line"><a name="l01863"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite_command.html#a6d1c61aa253c05e163506aec881bfb49"> 1863</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">override</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html#a6d1c61aa253c05e163506aec881bfb49">ToString</a> ()</div>
<div class="line"><a name="l01864"></a><span class="lineno"> 1864</span>&#160;        {</div>
<div class="line"><a name="l01865"></a><span class="lineno"> 1865</span>&#160;            var parts = <span class="keyword">new</span> <span class="keywordtype">string</span>[1 + _bindings.Count];</div>
<div class="line"><a name="l01866"></a><span class="lineno"> 1866</span>&#160;            parts [0] = CommandText;</div>
<div class="line"><a name="l01867"></a><span class="lineno"> 1867</span>&#160;            var i = 1;</div>
<div class="line"><a name="l01868"></a><span class="lineno"> 1868</span>&#160;            <span class="keywordflow">foreach</span> (var b <span class="keywordflow">in</span> _bindings) {</div>
<div class="line"><a name="l01869"></a><span class="lineno"> 1869</span>&#160;                parts [i] = string.Format (<span class="stringliteral">&quot;  {0}: {1}&quot;</span>, i - 1, b.Value);</div>
<div class="line"><a name="l01870"></a><span class="lineno"> 1870</span>&#160;                i++;</div>
<div class="line"><a name="l01871"></a><span class="lineno"> 1871</span>&#160;            }</div>
<div class="line"><a name="l01872"></a><span class="lineno"> 1872</span>&#160;            <span class="keywordflow">return</span> string.Join (Environment.NewLine, parts);</div>
<div class="line"><a name="l01873"></a><span class="lineno"> 1873</span>&#160;        }</div>
<div class="line"><a name="l01874"></a><span class="lineno"> 1874</span>&#160;</div>
<div class="line"><a name="l01875"></a><span class="lineno"> 1875</span>&#160;        <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> Prepare()</div>
<div class="line"><a name="l01876"></a><span class="lineno"> 1876</span>&#160;        {</div>
<div class="line"><a name="l01877"></a><span class="lineno"> 1877</span>&#160;            var stmt = SQLite3.Prepare2 (_conn.Handle, CommandText);</div>
<div class="line"><a name="l01878"></a><span class="lineno"> 1878</span>&#160;            BindAll (stmt);</div>
<div class="line"><a name="l01879"></a><span class="lineno"> 1879</span>&#160;            <span class="keywordflow">return</span> stmt;</div>
<div class="line"><a name="l01880"></a><span class="lineno"> 1880</span>&#160;        }</div>
<div class="line"><a name="l01881"></a><span class="lineno"> 1881</span>&#160;</div>
<div class="line"><a name="l01882"></a><span class="lineno"> 1882</span>&#160;        <span class="keywordtype">void</span> Finalize (<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt)</div>
<div class="line"><a name="l01883"></a><span class="lineno"> 1883</span>&#160;        {</div>
<div class="line"><a name="l01884"></a><span class="lineno"> 1884</span>&#160;            SQLite3.Finalize (stmt);</div>
<div class="line"><a name="l01885"></a><span class="lineno"> 1885</span>&#160;        }</div>
<div class="line"><a name="l01886"></a><span class="lineno"> 1886</span>&#160;</div>
<div class="line"><a name="l01887"></a><span class="lineno"> 1887</span>&#160;        <span class="keywordtype">void</span> BindAll (<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt)</div>
<div class="line"><a name="l01888"></a><span class="lineno"> 1888</span>&#160;        {</div>
<div class="line"><a name="l01889"></a><span class="lineno"> 1889</span>&#160;            <span class="keywordtype">int</span> nextIdx = 1;</div>
<div class="line"><a name="l01890"></a><span class="lineno"> 1890</span>&#160;            <span class="keywordflow">foreach</span> (var b <span class="keywordflow">in</span> _bindings) {</div>
<div class="line"><a name="l01891"></a><span class="lineno"> 1891</span>&#160;                <span class="keywordflow">if</span> (b.Name != null) {</div>
<div class="line"><a name="l01892"></a><span class="lineno"> 1892</span>&#160;                    b.Index = SQLite3.BindParameterIndex (stmt, b.Name);</div>
<div class="line"><a name="l01893"></a><span class="lineno"> 1893</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01894"></a><span class="lineno"> 1894</span>&#160;                    b.Index = nextIdx++;</div>
<div class="line"><a name="l01895"></a><span class="lineno"> 1895</span>&#160;                }</div>
<div class="line"><a name="l01896"></a><span class="lineno"> 1896</span>&#160;                </div>
<div class="line"><a name="l01897"></a><span class="lineno"> 1897</span>&#160;                BindParameter (stmt, b.Index, b.Value, _conn.StoreDateTimeAsTicks);</div>
<div class="line"><a name="l01898"></a><span class="lineno"> 1898</span>&#160;            }</div>
<div class="line"><a name="l01899"></a><span class="lineno"> 1899</span>&#160;        }</div>
<div class="line"><a name="l01900"></a><span class="lineno"> 1900</span>&#160;</div>
<div class="line"><a name="l01901"></a><span class="lineno"> 1901</span>&#160;        <span class="keyword">internal</span> <span class="keyword">static</span> IntPtr NegativePointer = <span class="keyword">new</span> IntPtr (-1);</div>
<div class="line"><a name="l01902"></a><span class="lineno"> 1902</span>&#160;</div>
<div class="line"><a name="l01903"></a><span class="lineno"> 1903</span>&#160;        <span class="keyword">internal</span> <span class="keyword">static</span> <span class="keywordtype">void</span> BindParameter (<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">object</span> value, <span class="keywordtype">bool</span> storeDateTimeAsTicks)</div>
<div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>&#160;        {</div>
<div class="line"><a name="l01905"></a><span class="lineno"> 1905</span>&#160;            <span class="keywordflow">if</span> (value == null) {</div>
<div class="line"><a name="l01906"></a><span class="lineno"> 1906</span>&#160;                SQLite3.BindNull (stmt, index);</div>
<div class="line"><a name="l01907"></a><span class="lineno"> 1907</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01908"></a><span class="lineno"> 1908</span>&#160;                <span class="keywordflow">if</span> (value is Int32) {</div>
<div class="line"><a name="l01909"></a><span class="lineno"> 1909</span>&#160;                    SQLite3.BindInt (stmt, index, (int)value);</div>
<div class="line"><a name="l01910"></a><span class="lineno"> 1910</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is String) {</div>
<div class="line"><a name="l01911"></a><span class="lineno"> 1911</span>&#160;                    SQLite3.BindText (stmt, index, (string)value, -1, NegativePointer);</div>
<div class="line"><a name="l01912"></a><span class="lineno"> 1912</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is Byte || value is UInt16 || value is SByte || value is Int16) {</div>
<div class="line"><a name="l01913"></a><span class="lineno"> 1913</span>&#160;                    SQLite3.BindInt (stmt, index, Convert.ToInt32 (value));</div>
<div class="line"><a name="l01914"></a><span class="lineno"> 1914</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is Boolean) {</div>
<div class="line"><a name="l01915"></a><span class="lineno"> 1915</span>&#160;                    SQLite3.BindInt (stmt, index, (bool)value ? 1 : 0);</div>
<div class="line"><a name="l01916"></a><span class="lineno"> 1916</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is UInt32 || value is Int64) {</div>
<div class="line"><a name="l01917"></a><span class="lineno"> 1917</span>&#160;                    SQLite3.BindInt64 (stmt, index, Convert.ToInt64 (value));</div>
<div class="line"><a name="l01918"></a><span class="lineno"> 1918</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is Single || value is Double || value is Decimal) {</div>
<div class="line"><a name="l01919"></a><span class="lineno"> 1919</span>&#160;                    SQLite3.BindDouble (stmt, index, Convert.ToDouble (value));</div>
<div class="line"><a name="l01920"></a><span class="lineno"> 1920</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is DateTime) {</div>
<div class="line"><a name="l01921"></a><span class="lineno"> 1921</span>&#160;                    <span class="keywordflow">if</span> (storeDateTimeAsTicks) {</div>
<div class="line"><a name="l01922"></a><span class="lineno"> 1922</span>&#160;                        SQLite3.BindInt64 (stmt, index, ((DateTime)value).Ticks);</div>
<div class="line"><a name="l01923"></a><span class="lineno"> 1923</span>&#160;                    }</div>
<div class="line"><a name="l01924"></a><span class="lineno"> 1924</span>&#160;                    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01925"></a><span class="lineno"> 1925</span>&#160;                        SQLite3.BindText (stmt, index, ((DateTime)value).ToString (<span class="stringliteral">&quot;yyyy-MM-dd HH:mm:ss&quot;</span>), -1, NegativePointer);</div>
<div class="line"><a name="l01926"></a><span class="lineno"> 1926</span>&#160;                    }</div>
<div class="line"><a name="l01927"></a><span class="lineno"> 1927</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01928"></a><span class="lineno"> 1928</span>&#160;<span class="preprocessor"></span>                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value.GetType().IsEnum) {</div>
<div class="line"><a name="l01929"></a><span class="lineno"> 1929</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01930"></a><span class="lineno"> 1930</span>&#160;<span class="preprocessor"></span>                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value.GetType().GetTypeInfo().IsEnum) {</div>
<div class="line"><a name="l01931"></a><span class="lineno"> 1931</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01932"></a><span class="lineno"> 1932</span>&#160;<span class="preprocessor"></span>                    SQLite3.BindInt (stmt, index, Convert.ToInt32 (value));</div>
<div class="line"><a name="l01933"></a><span class="lineno"> 1933</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is byte[]){</div>
<div class="line"><a name="l01934"></a><span class="lineno"> 1934</span>&#160;                    SQLite3.BindBlob(stmt, index, (byte[]) value, ((byte[]) value).Length, NegativePointer);</div>
<div class="line"><a name="l01935"></a><span class="lineno"> 1935</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value is Guid) {</div>
<div class="line"><a name="l01936"></a><span class="lineno"> 1936</span>&#160;                    SQLite3.BindText(stmt, index, ((Guid)value).ToString(), 72, NegativePointer);</div>
<div class="line"><a name="l01937"></a><span class="lineno"> 1937</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01938"></a><span class="lineno"> 1938</span>&#160;                    <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException(<span class="stringliteral">&quot;Cannot store type: &quot;</span> + value.GetType());</div>
<div class="line"><a name="l01939"></a><span class="lineno"> 1939</span>&#160;                }</div>
<div class="line"><a name="l01940"></a><span class="lineno"> 1940</span>&#160;            }</div>
<div class="line"><a name="l01941"></a><span class="lineno"> 1941</span>&#160;        }</div>
<div class="line"><a name="l01942"></a><span class="lineno"> 1942</span>&#160;</div>
<div class="line"><a name="l01943"></a><span class="lineno"> 1943</span>&#160;        <span class="keyword">class </span>Binding</div>
<div class="line"><a name="l01944"></a><span class="lineno"> 1944</span>&#160;        {</div>
<div class="line"><a name="l01945"></a><span class="lineno"> 1945</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> Name { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01946"></a><span class="lineno"> 1946</span>&#160;</div>
<div class="line"><a name="l01947"></a><span class="lineno"> 1947</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">object</span> Value { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01948"></a><span class="lineno"> 1948</span>&#160;</div>
<div class="line"><a name="l01949"></a><span class="lineno"> 1949</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">int</span> Index { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l01950"></a><span class="lineno"> 1950</span>&#160;        }</div>
<div class="line"><a name="l01951"></a><span class="lineno"> 1951</span>&#160;</div>
<div class="line"><a name="l01952"></a><span class="lineno"> 1952</span>&#160;        <span class="keywordtype">object</span> ReadCol (<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, SQLite3.ColType type, Type clrType)</div>
<div class="line"><a name="l01953"></a><span class="lineno"> 1953</span>&#160;        {</div>
<div class="line"><a name="l01954"></a><span class="lineno"> 1954</span>&#160;            <span class="keywordflow">if</span> (type == SQLite3.ColType.Null) {</div>
<div class="line"><a name="l01955"></a><span class="lineno"> 1955</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l01956"></a><span class="lineno"> 1956</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01957"></a><span class="lineno"> 1957</span>&#160;                <span class="keywordflow">if</span> (clrType == typeof(String)) {</div>
<div class="line"><a name="l01958"></a><span class="lineno"> 1958</span>&#160;                    <span class="keywordflow">return</span> SQLite3.ColumnString (stmt, index);</div>
<div class="line"><a name="l01959"></a><span class="lineno"> 1959</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Int32)) {</div>
<div class="line"><a name="l01960"></a><span class="lineno"> 1960</span>&#160;                    <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)SQLite3.ColumnInt (stmt, index);</div>
<div class="line"><a name="l01961"></a><span class="lineno"> 1961</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Boolean)) {</div>
<div class="line"><a name="l01962"></a><span class="lineno"> 1962</span>&#160;                    <span class="keywordflow">return</span> SQLite3.ColumnInt (stmt, index) == 1;</div>
<div class="line"><a name="l01963"></a><span class="lineno"> 1963</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(<span class="keywordtype">double</span>)) {</div>
<div class="line"><a name="l01964"></a><span class="lineno"> 1964</span>&#160;                    <span class="keywordflow">return</span> SQLite3.ColumnDouble (stmt, index);</div>
<div class="line"><a name="l01965"></a><span class="lineno"> 1965</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(<span class="keywordtype">float</span>)) {</div>
<div class="line"><a name="l01966"></a><span class="lineno"> 1966</span>&#160;                    <span class="keywordflow">return</span> (<span class="keywordtype">float</span>)SQLite3.ColumnDouble (stmt, index);</div>
<div class="line"><a name="l01967"></a><span class="lineno"> 1967</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(DateTime)) {</div>
<div class="line"><a name="l01968"></a><span class="lineno"> 1968</span>&#160;                    <span class="keywordflow">if</span> (_conn.StoreDateTimeAsTicks) {</div>
<div class="line"><a name="l01969"></a><span class="lineno"> 1969</span>&#160;                        <span class="keywordflow">return</span> <span class="keyword">new</span> DateTime (SQLite3.ColumnInt64 (stmt, index));</div>
<div class="line"><a name="l01970"></a><span class="lineno"> 1970</span>&#160;                    }</div>
<div class="line"><a name="l01971"></a><span class="lineno"> 1971</span>&#160;                    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01972"></a><span class="lineno"> 1972</span>&#160;                        var text = SQLite3.ColumnString (stmt, index);</div>
<div class="line"><a name="l01973"></a><span class="lineno"> 1973</span>&#160;                        <span class="keywordflow">return</span> DateTime.Parse (text);</div>
<div class="line"><a name="l01974"></a><span class="lineno"> 1974</span>&#160;                    }</div>
<div class="line"><a name="l01975"></a><span class="lineno"> 1975</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l01976"></a><span class="lineno"> 1976</span>&#160;<span class="preprocessor"></span>                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType.IsEnum) {</div>
<div class="line"><a name="l01977"></a><span class="lineno"> 1977</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l01978"></a><span class="lineno"> 1978</span>&#160;<span class="preprocessor"></span>                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType.GetTypeInfo().IsEnum) {</div>
<div class="line"><a name="l01979"></a><span class="lineno"> 1979</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01980"></a><span class="lineno"> 1980</span>&#160;<span class="preprocessor"></span>                    <span class="keywordflow">return</span> SQLite3.ColumnInt (stmt, index);</div>
<div class="line"><a name="l01981"></a><span class="lineno"> 1981</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Int64)) {</div>
<div class="line"><a name="l01982"></a><span class="lineno"> 1982</span>&#160;                    <span class="keywordflow">return</span> SQLite3.ColumnInt64 (stmt, index);</div>
<div class="line"><a name="l01983"></a><span class="lineno"> 1983</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(UInt32)) {</div>
<div class="line"><a name="l01984"></a><span class="lineno"> 1984</span>&#160;                    <span class="keywordflow">return</span> (uint)SQLite3.ColumnInt64 (stmt, index);</div>
<div class="line"><a name="l01985"></a><span class="lineno"> 1985</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(decimal)) {</div>
<div class="line"><a name="l01986"></a><span class="lineno"> 1986</span>&#160;                    <span class="keywordflow">return</span> (decimal)SQLite3.ColumnDouble (stmt, index);</div>
<div class="line"><a name="l01987"></a><span class="lineno"> 1987</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Byte)) {</div>
<div class="line"><a name="l01988"></a><span class="lineno"> 1988</span>&#160;                    <span class="keywordflow">return</span> (byte)SQLite3.ColumnInt (stmt, index);</div>
<div class="line"><a name="l01989"></a><span class="lineno"> 1989</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(UInt16)) {</div>
<div class="line"><a name="l01990"></a><span class="lineno"> 1990</span>&#160;                    <span class="keywordflow">return</span> (ushort)SQLite3.ColumnInt (stmt, index);</div>
<div class="line"><a name="l01991"></a><span class="lineno"> 1991</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Int16)) {</div>
<div class="line"><a name="l01992"></a><span class="lineno"> 1992</span>&#160;                    <span class="keywordflow">return</span> (<span class="keywordtype">short</span>)SQLite3.ColumnInt (stmt, index);</div>
<div class="line"><a name="l01993"></a><span class="lineno"> 1993</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(sbyte)) {</div>
<div class="line"><a name="l01994"></a><span class="lineno"> 1994</span>&#160;                    <span class="keywordflow">return</span> (sbyte)SQLite3.ColumnInt (stmt, index);</div>
<div class="line"><a name="l01995"></a><span class="lineno"> 1995</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(byte[])) {</div>
<div class="line"><a name="l01996"></a><span class="lineno"> 1996</span>&#160;                    <span class="keywordflow">return</span> SQLite3.ColumnByteArray (stmt, index);</div>
<div class="line"><a name="l01997"></a><span class="lineno"> 1997</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (clrType == typeof(Guid)) {</div>
<div class="line"><a name="l01998"></a><span class="lineno"> 1998</span>&#160;                  var text = SQLite3.ColumnString(stmt, index);</div>
<div class="line"><a name="l01999"></a><span class="lineno"> 1999</span>&#160;                  <span class="keywordflow">return</span> <span class="keyword">new</span> Guid(text);</div>
<div class="line"><a name="l02000"></a><span class="lineno"> 2000</span>&#160;                } <span class="keywordflow">else</span>{</div>
<div class="line"><a name="l02001"></a><span class="lineno"> 2001</span>&#160;                    <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Don&#39;t know how to read &quot;</span> + clrType);</div>
<div class="line"><a name="l02002"></a><span class="lineno"> 2002</span>&#160;                }</div>
<div class="line"><a name="l02003"></a><span class="lineno"> 2003</span>&#160;            }</div>
<div class="line"><a name="l02004"></a><span class="lineno"> 2004</span>&#160;        }</div>
<div class="line"><a name="l02005"></a><span class="lineno"> 2005</span>&#160;    }</div>
<div class="line"><a name="l02006"></a><span class="lineno"> 2006</span>&#160;</div>
<div class="line"><a name="l02010"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html"> 2010</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html">PreparedSqlLiteInsertCommand</a> : IDisposable</div>
<div class="line"><a name="l02011"></a><span class="lineno"> 2011</span>&#160;    {</div>
<div class="line"><a name="l02012"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a9bc93418687042e4ee5b0fde8291b388"> 2012</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> Initialized { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02013"></a><span class="lineno"> 2013</span>&#160;</div>
<div class="line"><a name="l02014"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#aef54b0acba4b83045e5e5fa17286bb27"> 2014</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> Connection { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02015"></a><span class="lineno"> 2015</span>&#160;</div>
<div class="line"><a name="l02016"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a435ce4bcdc122f2f5b6b96a7d89b3a29"> 2016</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> CommandText { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02017"></a><span class="lineno"> 2017</span>&#160;</div>
<div class="line"><a name="l02018"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a5b8cfa2ccca99c02f38538be5d089c2d"> 2018</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> Statement { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02019"></a><span class="lineno"> 2019</span>&#160;        <span class="keyword">internal</span> <span class="keyword">static</span> readonly <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> NullStatement = <span class="keywordflow">default</span>(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a>);</div>
<div class="line"><a name="l02020"></a><span class="lineno"> 2020</span>&#160;</div>
<div class="line"><a name="l02021"></a><span class="lineno"> 2021</span>&#160;        <span class="keyword">internal</span> <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html">PreparedSqlLiteInsertCommand</a> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> conn)</div>
<div class="line"><a name="l02022"></a><span class="lineno"> 2022</span>&#160;        {</div>
<div class="line"><a name="l02023"></a><span class="lineno"> 2023</span>&#160;            Connection = conn;</div>
<div class="line"><a name="l02024"></a><span class="lineno"> 2024</span>&#160;        }</div>
<div class="line"><a name="l02025"></a><span class="lineno"> 2025</span>&#160;</div>
<div class="line"><a name="l02026"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a9f95629a1b978710741c23129d78fccc"> 2026</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a9f95629a1b978710741c23129d78fccc">ExecuteNonQuery</a> (<span class="keywordtype">object</span>[] source)</div>
<div class="line"><a name="l02027"></a><span class="lineno"> 2027</span>&#160;        {</div>
<div class="line"><a name="l02028"></a><span class="lineno"> 2028</span>&#160;            <span class="keywordflow">if</span> (Connection.Trace) {</div>
<div class="line"><a name="l02029"></a><span class="lineno"> 2029</span>&#160;                Debug.WriteLine (<span class="stringliteral">&quot;Executing: &quot;</span> + CommandText);</div>
<div class="line"><a name="l02030"></a><span class="lineno"> 2030</span>&#160;            }</div>
<div class="line"><a name="l02031"></a><span class="lineno"> 2031</span>&#160;</div>
<div class="line"><a name="l02032"></a><span class="lineno"> 2032</span>&#160;            var r = SQLite3.Result.OK;</div>
<div class="line"><a name="l02033"></a><span class="lineno"> 2033</span>&#160;</div>
<div class="line"><a name="l02034"></a><span class="lineno"> 2034</span>&#160;            <span class="keywordflow">if</span> (!Initialized) {</div>
<div class="line"><a name="l02035"></a><span class="lineno"> 2035</span>&#160;                Statement = Prepare ();</div>
<div class="line"><a name="l02036"></a><span class="lineno"> 2036</span>&#160;                Initialized = <span class="keyword">true</span>;</div>
<div class="line"><a name="l02037"></a><span class="lineno"> 2037</span>&#160;            }</div>
<div class="line"><a name="l02038"></a><span class="lineno"> 2038</span>&#160;</div>
<div class="line"><a name="l02039"></a><span class="lineno"> 2039</span>&#160;            <span class="comment">//bind the values.</span></div>
<div class="line"><a name="l02040"></a><span class="lineno"> 2040</span>&#160;            <span class="keywordflow">if</span> (source != null) {</div>
<div class="line"><a name="l02041"></a><span class="lineno"> 2041</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; source.Length; i++) {</div>
<div class="line"><a name="l02042"></a><span class="lineno"> 2042</span>&#160;                    SQLiteCommand.BindParameter (Statement, i + 1, source [i], Connection.StoreDateTimeAsTicks);</div>
<div class="line"><a name="l02043"></a><span class="lineno"> 2043</span>&#160;                }</div>
<div class="line"><a name="l02044"></a><span class="lineno"> 2044</span>&#160;            }</div>
<div class="line"><a name="l02045"></a><span class="lineno"> 2045</span>&#160;            r = SQLite3.Step (Statement);</div>
<div class="line"><a name="l02046"></a><span class="lineno"> 2046</span>&#160;</div>
<div class="line"><a name="l02047"></a><span class="lineno"> 2047</span>&#160;            <span class="keywordflow">if</span> (r == <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.Done) {</div>
<div class="line"><a name="l02048"></a><span class="lineno"> 2048</span>&#160;                <span class="keywordtype">int</span> rowsAffected = SQLite3.Changes (Connection.Handle);</div>
<div class="line"><a name="l02049"></a><span class="lineno"> 2049</span>&#160;                SQLite3.Reset (Statement);</div>
<div class="line"><a name="l02050"></a><span class="lineno"> 2050</span>&#160;                <span class="keywordflow">return</span> rowsAffected;</div>
<div class="line"><a name="l02051"></a><span class="lineno"> 2051</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a>.<a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.Error) {</div>
<div class="line"><a name="l02052"></a><span class="lineno"> 2052</span>&#160;                <span class="keywordtype">string</span> msg = SQLite3.GetErrmsg (Connection.Handle);</div>
<div class="line"><a name="l02053"></a><span class="lineno"> 2053</span>&#160;                SQLite3.Reset (Statement);</div>
<div class="line"><a name="l02054"></a><span class="lineno"> 2054</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (r, msg);</div>
<div class="line"><a name="l02055"></a><span class="lineno"> 2055</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02056"></a><span class="lineno"> 2056</span>&#160;                SQLite3.Reset (Statement);</div>
<div class="line"><a name="l02057"></a><span class="lineno"> 2057</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (r, r.ToString ());</div>
<div class="line"><a name="l02058"></a><span class="lineno"> 2058</span>&#160;            }</div>
<div class="line"><a name="l02059"></a><span class="lineno"> 2059</span>&#160;        }</div>
<div class="line"><a name="l02060"></a><span class="lineno"> 2060</span>&#160;</div>
<div class="line"><a name="l02061"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a207353ff88c74bc45cb076fe3cf463bb"> 2061</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a207353ff88c74bc45cb076fe3cf463bb">Prepare</a> ()</div>
<div class="line"><a name="l02062"></a><span class="lineno"> 2062</span>&#160;        {</div>
<div class="line"><a name="l02063"></a><span class="lineno"> 2063</span>&#160;            var stmt = SQLite3.Prepare2 (Connection.Handle, CommandText);</div>
<div class="line"><a name="l02064"></a><span class="lineno"> 2064</span>&#160;            <span class="keywordflow">return</span> stmt;</div>
<div class="line"><a name="l02065"></a><span class="lineno"> 2065</span>&#160;        }</div>
<div class="line"><a name="l02066"></a><span class="lineno"> 2066</span>&#160;</div>
<div class="line"><a name="l02067"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a4569b8fb13658e105658b073937efead"> 2067</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a4569b8fb13658e105658b073937efead">Dispose</a> ()</div>
<div class="line"><a name="l02068"></a><span class="lineno"> 2068</span>&#160;        {</div>
<div class="line"><a name="l02069"></a><span class="lineno"> 2069</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l02070"></a><span class="lineno"> 2070</span>&#160;            GC.SuppressFinalize (<span class="keyword">this</span>);</div>
<div class="line"><a name="l02071"></a><span class="lineno"> 2071</span>&#160;        }</div>
<div class="line"><a name="l02072"></a><span class="lineno"> 2072</span>&#160;</div>
<div class="line"><a name="l02073"></a><span class="lineno"> 2073</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a> (<span class="keywordtype">bool</span> disposing)</div>
<div class="line"><a name="l02074"></a><span class="lineno"> 2074</span>&#160;        {</div>
<div class="line"><a name="l02075"></a><span class="lineno"> 2075</span>&#160;            <span class="keywordflow">if</span> (Statement != NullStatement) {</div>
<div class="line"><a name="l02076"></a><span class="lineno"> 2076</span>&#160;                <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l02077"></a><span class="lineno"> 2077</span>&#160;                    SQLite3.Finalize (Statement);</div>
<div class="line"><a name="l02078"></a><span class="lineno"> 2078</span>&#160;                } <span class="keywordflow">finally</span> {</div>
<div class="line"><a name="l02079"></a><span class="lineno"> 2079</span>&#160;                    Statement = NullStatement;</div>
<div class="line"><a name="l02080"></a><span class="lineno"> 2080</span>&#160;                    Connection = null;</div>
<div class="line"><a name="l02081"></a><span class="lineno"> 2081</span>&#160;                }</div>
<div class="line"><a name="l02082"></a><span class="lineno"> 2082</span>&#160;            }</div>
<div class="line"><a name="l02083"></a><span class="lineno"> 2083</span>&#160;        }</div>
<div class="line"><a name="l02084"></a><span class="lineno"> 2084</span>&#160;</div>
<div class="line"><a name="l02085"></a><span class="lineno"> 2085</span>&#160;        ~PreparedSqlLiteInsertCommand ()</div>
<div class="line"><a name="l02086"></a><span class="lineno"> 2086</span>&#160;        {</div>
<div class="line"><a name="l02087"></a><span class="lineno"> 2087</span>&#160;            <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">Dispose</a> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l02088"></a><span class="lineno"> 2088</span>&#160;        }</div>
<div class="line"><a name="l02089"></a><span class="lineno"> 2089</span>&#160;    }</div>
<div class="line"><a name="l02090"></a><span class="lineno"> 2090</span>&#160;</div>
<div class="line"><a name="l02091"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_base_table_query.html"> 2091</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">abstract</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_base_table_query.html">BaseTableQuery</a></div>
<div class="line"><a name="l02092"></a><span class="lineno"> 2092</span>&#160;    {</div>
<div class="line"><a name="l02093"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_base_table_query_1_1_ordering.html"> 2093</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_base_table_query_1_1_ordering.html">Ordering</a></div>
<div class="line"><a name="l02094"></a><span class="lineno"> 2094</span>&#160;        {</div>
<div class="line"><a name="l02095"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_base_table_query_1_1_ordering.html#a4a73e6f27bb0b7b71672c2440f1e26d8"> 2095</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> ColumnName { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02096"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_base_table_query_1_1_ordering.html#a6ac459a921405f8a577c64f70e615359"> 2096</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> Ascending { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02097"></a><span class="lineno"> 2097</span>&#160;        }</div>
<div class="line"><a name="l02098"></a><span class="lineno"> 2098</span>&#160;    }</div>
<div class="line"><a name="l02099"></a><span class="lineno"> 2099</span>&#160;</div>
<div class="line"><a name="l02100"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html"> 2100</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span>TableQuery&lt;T&gt; : <a class="code" href="class_s_q_lite_1_1_base_table_query.html">BaseTableQuery</a>, IEnumerable&lt;T&gt;</div>
<div class="line"><a name="l02101"></a><span class="lineno"> 2101</span>&#160;    {</div>
<div class="line"><a name="l02102"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a1bd298971d8227cb1b0b57c2260a681a"> 2102</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> Connection { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l02103"></a><span class="lineno"> 2103</span>&#160;</div>
<div class="line"><a name="l02104"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a9ec80a11185abc4cc6766789d1723b4c"> 2104</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> Table { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l02105"></a><span class="lineno"> 2105</span>&#160;</div>
<div class="line"><a name="l02106"></a><span class="lineno"> 2106</span>&#160;        Expression _where;</div>
<div class="line"><a name="l02107"></a><span class="lineno"> 2107</span>&#160;        List&lt;Ordering&gt; _orderBys;</div>
<div class="line"><a name="l02108"></a><span class="lineno"> 2108</span>&#160;        <span class="keywordtype">int</span>? _limit;</div>
<div class="line"><a name="l02109"></a><span class="lineno"> 2109</span>&#160;        <span class="keywordtype">int</span>? _offset;</div>
<div class="line"><a name="l02110"></a><span class="lineno"> 2110</span>&#160;</div>
<div class="line"><a name="l02111"></a><span class="lineno"> 2111</span>&#160;        <a class="code" href="class_s_q_lite_1_1_base_table_query.html">BaseTableQuery</a> _joinInner;</div>
<div class="line"><a name="l02112"></a><span class="lineno"> 2112</span>&#160;        Expression _joinInnerKeySelector;</div>
<div class="line"><a name="l02113"></a><span class="lineno"> 2113</span>&#160;        <a class="code" href="class_s_q_lite_1_1_base_table_query.html">BaseTableQuery</a> _joinOuter;</div>
<div class="line"><a name="l02114"></a><span class="lineno"> 2114</span>&#160;        Expression _joinOuterKeySelector;</div>
<div class="line"><a name="l02115"></a><span class="lineno"> 2115</span>&#160;        Expression _joinSelector;</div>
<div class="line"><a name="l02116"></a><span class="lineno"> 2116</span>&#160;                </div>
<div class="line"><a name="l02117"></a><span class="lineno"> 2117</span>&#160;        Expression _selector;</div>
<div class="line"><a name="l02118"></a><span class="lineno"> 2118</span>&#160;</div>
<div class="line"><a name="l02119"></a><span class="lineno"> 2119</span>&#160;        TableQuery (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> conn, <a class="code" href="class_s_q_lite_1_1_table_mapping.html">TableMapping</a> table)</div>
<div class="line"><a name="l02120"></a><span class="lineno"> 2120</span>&#160;        {</div>
<div class="line"><a name="l02121"></a><span class="lineno"> 2121</span>&#160;            Connection = conn;</div>
<div class="line"><a name="l02122"></a><span class="lineno"> 2122</span>&#160;            Table = table;</div>
<div class="line"><a name="l02123"></a><span class="lineno"> 2123</span>&#160;        }</div>
<div class="line"><a name="l02124"></a><span class="lineno"> 2124</span>&#160;</div>
<div class="line"><a name="l02125"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a2e3874f45af10a8c44db821c7a848aab"> 2125</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a2e3874f45af10a8c44db821c7a848aab">TableQuery</a> (<a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLiteConnection</a> conn)</div>
<div class="line"><a name="l02126"></a><span class="lineno"> 2126</span>&#160;        {</div>
<div class="line"><a name="l02127"></a><span class="lineno"> 2127</span>&#160;            Connection = conn;</div>
<div class="line"><a name="l02128"></a><span class="lineno"> 2128</span>&#160;            Table = Connection.GetMapping (typeof(T));</div>
<div class="line"><a name="l02129"></a><span class="lineno"> 2129</span>&#160;        }</div>
<div class="line"><a name="l02130"></a><span class="lineno"> 2130</span>&#160;</div>
<div class="line"><a name="l02131"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a744de6c9fda8bf39de015ae41c0b2cb3"> 2131</a></span>&#160;        <span class="keyword">public</span> TableQuery&lt;U&gt; Clone&lt;U&gt; ()</div>
<div class="line"><a name="l02132"></a><span class="lineno"> 2132</span>&#160;        {</div>
<div class="line"><a name="l02133"></a><span class="lineno"> 2133</span>&#160;            var q = <span class="keyword">new</span> TableQuery&lt;U&gt; (Connection, Table);</div>
<div class="line"><a name="l02134"></a><span class="lineno"> 2134</span>&#160;            q._where = _where;</div>
<div class="line"><a name="l02135"></a><span class="lineno"> 2135</span>&#160;            q._deferred = _deferred;</div>
<div class="line"><a name="l02136"></a><span class="lineno"> 2136</span>&#160;            <span class="keywordflow">if</span> (_orderBys != null) {</div>
<div class="line"><a name="l02137"></a><span class="lineno"> 2137</span>&#160;                q._orderBys = <span class="keyword">new</span> List&lt;Ordering&gt; (_orderBys);</div>
<div class="line"><a name="l02138"></a><span class="lineno"> 2138</span>&#160;            }</div>
<div class="line"><a name="l02139"></a><span class="lineno"> 2139</span>&#160;            q._limit = _limit;</div>
<div class="line"><a name="l02140"></a><span class="lineno"> 2140</span>&#160;            q._offset = _offset;</div>
<div class="line"><a name="l02141"></a><span class="lineno"> 2141</span>&#160;            q._joinInner = _joinInner;</div>
<div class="line"><a name="l02142"></a><span class="lineno"> 2142</span>&#160;            q._joinInnerKeySelector = _joinInnerKeySelector;</div>
<div class="line"><a name="l02143"></a><span class="lineno"> 2143</span>&#160;            q._joinOuter = _joinOuter;</div>
<div class="line"><a name="l02144"></a><span class="lineno"> 2144</span>&#160;            q._joinOuterKeySelector = _joinOuterKeySelector;</div>
<div class="line"><a name="l02145"></a><span class="lineno"> 2145</span>&#160;            q._joinSelector = _joinSelector;</div>
<div class="line"><a name="l02146"></a><span class="lineno"> 2146</span>&#160;            q._selector = _selector;</div>
<div class="line"><a name="l02147"></a><span class="lineno"> 2147</span>&#160;            <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02148"></a><span class="lineno"> 2148</span>&#160;        }</div>
<div class="line"><a name="l02149"></a><span class="lineno"> 2149</span>&#160;</div>
<div class="line"><a name="l02150"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#aafcda8a0d85fc7708bc29cc1ae254be5"> 2150</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#aafcda8a0d85fc7708bc29cc1ae254be5">Where</a> (Expression&lt;Func&lt;T, bool&gt;&gt; predExpr)</div>
<div class="line"><a name="l02151"></a><span class="lineno"> 2151</span>&#160;        {</div>
<div class="line"><a name="l02152"></a><span class="lineno"> 2152</span>&#160;            <span class="keywordflow">if</span> (predExpr.NodeType == ExpressionType.Lambda) {</div>
<div class="line"><a name="l02153"></a><span class="lineno"> 2153</span>&#160;                var lambda = (LambdaExpression)predExpr;</div>
<div class="line"><a name="l02154"></a><span class="lineno"> 2154</span>&#160;                var pred = lambda.Body;</div>
<div class="line"><a name="l02155"></a><span class="lineno"> 2155</span>&#160;                var q = Clone&lt;T&gt; ();</div>
<div class="line"><a name="l02156"></a><span class="lineno"> 2156</span>&#160;                q.AddWhere (pred);</div>
<div class="line"><a name="l02157"></a><span class="lineno"> 2157</span>&#160;                <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02158"></a><span class="lineno"> 2158</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02159"></a><span class="lineno"> 2159</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Must be a predicate&quot;</span>);</div>
<div class="line"><a name="l02160"></a><span class="lineno"> 2160</span>&#160;            }</div>
<div class="line"><a name="l02161"></a><span class="lineno"> 2161</span>&#160;        }</div>
<div class="line"><a name="l02162"></a><span class="lineno"> 2162</span>&#160;</div>
<div class="line"><a name="l02163"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#abc1454c5581e01ee57873a8c59101d5c"> 2163</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#abc1454c5581e01ee57873a8c59101d5c">Take</a> (<span class="keywordtype">int</span> n)</div>
<div class="line"><a name="l02164"></a><span class="lineno"> 2164</span>&#160;        {</div>
<div class="line"><a name="l02165"></a><span class="lineno"> 2165</span>&#160;            var q = Clone&lt;T&gt; ();</div>
<div class="line"><a name="l02166"></a><span class="lineno"> 2166</span>&#160;            q._limit = n;</div>
<div class="line"><a name="l02167"></a><span class="lineno"> 2167</span>&#160;            <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02168"></a><span class="lineno"> 2168</span>&#160;        }</div>
<div class="line"><a name="l02169"></a><span class="lineno"> 2169</span>&#160;</div>
<div class="line"><a name="l02170"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a4bf49d4c603ea8a6db6d65e51bdd6458"> 2170</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a4bf49d4c603ea8a6db6d65e51bdd6458">Skip</a> (<span class="keywordtype">int</span> n)</div>
<div class="line"><a name="l02171"></a><span class="lineno"> 2171</span>&#160;        {</div>
<div class="line"><a name="l02172"></a><span class="lineno"> 2172</span>&#160;            var q = Clone&lt;T&gt; ();</div>
<div class="line"><a name="l02173"></a><span class="lineno"> 2173</span>&#160;            q._offset = n;</div>
<div class="line"><a name="l02174"></a><span class="lineno"> 2174</span>&#160;            <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02175"></a><span class="lineno"> 2175</span>&#160;        }</div>
<div class="line"><a name="l02176"></a><span class="lineno"> 2176</span>&#160;</div>
<div class="line"><a name="l02177"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a1adf19dc2456239c4b4a900995b2794d"> 2177</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a1adf19dc2456239c4b4a900995b2794d">ElementAt</a> (<span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02178"></a><span class="lineno"> 2178</span>&#160;        {</div>
<div class="line"><a name="l02179"></a><span class="lineno"> 2179</span>&#160;            <span class="keywordflow">return</span> Skip (index).Take (1).First ();</div>
<div class="line"><a name="l02180"></a><span class="lineno"> 2180</span>&#160;        }</div>
<div class="line"><a name="l02181"></a><span class="lineno"> 2181</span>&#160;</div>
<div class="line"><a name="l02182"></a><span class="lineno"> 2182</span>&#160;        <span class="keywordtype">bool</span> _deferred = <span class="keyword">false</span>;</div>
<div class="line"><a name="l02183"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a158964fb1e56e6679ab94cf101dcc6b3"> 2183</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a158964fb1e56e6679ab94cf101dcc6b3">Deferred</a> ()</div>
<div class="line"><a name="l02184"></a><span class="lineno"> 2184</span>&#160;        {</div>
<div class="line"><a name="l02185"></a><span class="lineno"> 2185</span>&#160;            var q = Clone&lt;T&gt; ();</div>
<div class="line"><a name="l02186"></a><span class="lineno"> 2186</span>&#160;            q._deferred = <span class="keyword">true</span>;</div>
<div class="line"><a name="l02187"></a><span class="lineno"> 2187</span>&#160;            <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02188"></a><span class="lineno"> 2188</span>&#160;        }</div>
<div class="line"><a name="l02189"></a><span class="lineno"> 2189</span>&#160;</div>
<div class="line"><a name="l02190"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#ae35684d62851a521aac3419af0c565fb"> 2190</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> OrderBy&lt;U&gt; (Expression&lt;Func&lt;T, U&gt;&gt; orderExpr)</div>
<div class="line"><a name="l02191"></a><span class="lineno"> 2191</span>&#160;        {</div>
<div class="line"><a name="l02192"></a><span class="lineno"> 2192</span>&#160;            <span class="keywordflow">return</span> AddOrderBy&lt;U&gt; (orderExpr, <span class="keyword">true</span>);</div>
<div class="line"><a name="l02193"></a><span class="lineno"> 2193</span>&#160;        }</div>
<div class="line"><a name="l02194"></a><span class="lineno"> 2194</span>&#160;</div>
<div class="line"><a name="l02195"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#aacf40c5e9162c7f25ebdb78a2811aec9"> 2195</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> OrderByDescending&lt;U&gt; (Expression&lt;Func&lt;T, U&gt;&gt; orderExpr)</div>
<div class="line"><a name="l02196"></a><span class="lineno"> 2196</span>&#160;        {</div>
<div class="line"><a name="l02197"></a><span class="lineno"> 2197</span>&#160;            <span class="keywordflow">return</span> AddOrderBy&lt;U&gt; (orderExpr, <span class="keyword">false</span>);</div>
<div class="line"><a name="l02198"></a><span class="lineno"> 2198</span>&#160;        }</div>
<div class="line"><a name="l02199"></a><span class="lineno"> 2199</span>&#160;</div>
<div class="line"><a name="l02200"></a><span class="lineno"> 2200</span>&#160;        <span class="keyword">private</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">TableQuery&lt;T&gt;</a> AddOrderBy&lt;U&gt; (Expression&lt;Func&lt;T, U&gt;&gt; orderExpr, <span class="keywordtype">bool</span> asc)</div>
<div class="line"><a name="l02201"></a><span class="lineno"> 2201</span>&#160;        {</div>
<div class="line"><a name="l02202"></a><span class="lineno"> 2202</span>&#160;            <span class="keywordflow">if</span> (orderExpr.NodeType == ExpressionType.Lambda) {</div>
<div class="line"><a name="l02203"></a><span class="lineno"> 2203</span>&#160;                var lambda = (LambdaExpression)orderExpr;</div>
<div class="line"><a name="l02204"></a><span class="lineno"> 2204</span>&#160;                </div>
<div class="line"><a name="l02205"></a><span class="lineno"> 2205</span>&#160;                MemberExpression mem = null;</div>
<div class="line"><a name="l02206"></a><span class="lineno"> 2206</span>&#160;                </div>
<div class="line"><a name="l02207"></a><span class="lineno"> 2207</span>&#160;                var unary = lambda.Body as UnaryExpression;</div>
<div class="line"><a name="l02208"></a><span class="lineno"> 2208</span>&#160;                <span class="keywordflow">if</span> (unary != null &amp;&amp; unary.NodeType == ExpressionType.Convert) {</div>
<div class="line"><a name="l02209"></a><span class="lineno"> 2209</span>&#160;                    mem = unary.Operand as MemberExpression;</div>
<div class="line"><a name="l02210"></a><span class="lineno"> 2210</span>&#160;                }</div>
<div class="line"><a name="l02211"></a><span class="lineno"> 2211</span>&#160;                <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02212"></a><span class="lineno"> 2212</span>&#160;                    mem = lambda.Body as MemberExpression;</div>
<div class="line"><a name="l02213"></a><span class="lineno"> 2213</span>&#160;                }</div>
<div class="line"><a name="l02214"></a><span class="lineno"> 2214</span>&#160;                </div>
<div class="line"><a name="l02215"></a><span class="lineno"> 2215</span>&#160;                <span class="keywordflow">if</span> (mem != null &amp;&amp; (mem.Expression.NodeType == ExpressionType.Parameter)) {</div>
<div class="line"><a name="l02216"></a><span class="lineno"> 2216</span>&#160;                    var q = Clone&lt;T&gt; ();</div>
<div class="line"><a name="l02217"></a><span class="lineno"> 2217</span>&#160;                    <span class="keywordflow">if</span> (q._orderBys == null) {</div>
<div class="line"><a name="l02218"></a><span class="lineno"> 2218</span>&#160;                        q._orderBys = <span class="keyword">new</span> List&lt;Ordering&gt; ();</div>
<div class="line"><a name="l02219"></a><span class="lineno"> 2219</span>&#160;                    }</div>
<div class="line"><a name="l02220"></a><span class="lineno"> 2220</span>&#160;                    q._orderBys.Add (<span class="keyword">new</span> Ordering {</div>
<div class="line"><a name="l02221"></a><span class="lineno"> 2221</span>&#160;                        ColumnName = Table.FindColumnWithPropertyName(mem.Member.Name).Name,</div>
<div class="line"><a name="l02222"></a><span class="lineno"> 2222</span>&#160;                        Ascending = asc</div>
<div class="line"><a name="l02223"></a><span class="lineno"> 2223</span>&#160;                    });</div>
<div class="line"><a name="l02224"></a><span class="lineno"> 2224</span>&#160;                    <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02225"></a><span class="lineno"> 2225</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02226"></a><span class="lineno"> 2226</span>&#160;                    <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Order By does not support: &quot;</span> + orderExpr);</div>
<div class="line"><a name="l02227"></a><span class="lineno"> 2227</span>&#160;                }</div>
<div class="line"><a name="l02228"></a><span class="lineno"> 2228</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02229"></a><span class="lineno"> 2229</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Must be a predicate&quot;</span>);</div>
<div class="line"><a name="l02230"></a><span class="lineno"> 2230</span>&#160;            }</div>
<div class="line"><a name="l02231"></a><span class="lineno"> 2231</span>&#160;        }</div>
<div class="line"><a name="l02232"></a><span class="lineno"> 2232</span>&#160;</div>
<div class="line"><a name="l02233"></a><span class="lineno"> 2233</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">void</span> AddWhere (Expression pred)</div>
<div class="line"><a name="l02234"></a><span class="lineno"> 2234</span>&#160;        {</div>
<div class="line"><a name="l02235"></a><span class="lineno"> 2235</span>&#160;            <span class="keywordflow">if</span> (_where == null) {</div>
<div class="line"><a name="l02236"></a><span class="lineno"> 2236</span>&#160;                _where = pred;</div>
<div class="line"><a name="l02237"></a><span class="lineno"> 2237</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02238"></a><span class="lineno"> 2238</span>&#160;                _where = Expression.AndAlso (_where, pred);</div>
<div class="line"><a name="l02239"></a><span class="lineno"> 2239</span>&#160;            }</div>
<div class="line"><a name="l02240"></a><span class="lineno"> 2240</span>&#160;        }</div>
<div class="line"><a name="l02241"></a><span class="lineno"> 2241</span>&#160;                </div>
<div class="line"><a name="l02242"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a292ef3b90067c4393cf377c369d942a1"> 2242</a></span>&#160;        <span class="keyword">public</span> TableQuery&lt;TResult&gt; Join&lt;TInner, TKey, TResult&gt; (</div>
<div class="line"><a name="l02243"></a><span class="lineno"> 2243</span>&#160;            TableQuery&lt;TInner&gt; inner,</div>
<div class="line"><a name="l02244"></a><span class="lineno"> 2244</span>&#160;            Expression&lt;Func&lt;T, TKey&gt;&gt; outerKeySelector,</div>
<div class="line"><a name="l02245"></a><span class="lineno"> 2245</span>&#160;            Expression&lt;Func&lt;TInner, TKey&gt;&gt; innerKeySelector,</div>
<div class="line"><a name="l02246"></a><span class="lineno"> 2246</span>&#160;            Expression&lt;Func&lt;T, TInner, TResult&gt;&gt; resultSelector)</div>
<div class="line"><a name="l02247"></a><span class="lineno"> 2247</span>&#160;        {</div>
<div class="line"><a name="l02248"></a><span class="lineno"> 2248</span>&#160;            var q = <span class="keyword">new</span> TableQuery&lt;TResult&gt; (Connection, Connection.GetMapping (typeof (TResult))) {</div>
<div class="line"><a name="l02249"></a><span class="lineno"> 2249</span>&#160;                _joinOuter = <span class="keyword">this</span>,</div>
<div class="line"><a name="l02250"></a><span class="lineno"> 2250</span>&#160;                _joinOuterKeySelector = outerKeySelector,</div>
<div class="line"><a name="l02251"></a><span class="lineno"> 2251</span>&#160;                _joinInner = inner,</div>
<div class="line"><a name="l02252"></a><span class="lineno"> 2252</span>&#160;                _joinInnerKeySelector = innerKeySelector,</div>
<div class="line"><a name="l02253"></a><span class="lineno"> 2253</span>&#160;                _joinSelector = resultSelector,</div>
<div class="line"><a name="l02254"></a><span class="lineno"> 2254</span>&#160;            };</div>
<div class="line"><a name="l02255"></a><span class="lineno"> 2255</span>&#160;            <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02256"></a><span class="lineno"> 2256</span>&#160;        }</div>
<div class="line"><a name="l02257"></a><span class="lineno"> 2257</span>&#160;                </div>
<div class="line"><a name="l02258"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a3726c9bfa1bb9a0efa35f847a3d9d77e"> 2258</a></span>&#160;        <span class="keyword">public</span> TableQuery&lt;TResult&gt; Select&lt;TResult&gt; (Expression&lt;Func&lt;T, TResult&gt;&gt; selector)</div>
<div class="line"><a name="l02259"></a><span class="lineno"> 2259</span>&#160;        {</div>
<div class="line"><a name="l02260"></a><span class="lineno"> 2260</span>&#160;            var q = Clone&lt;TResult&gt; ();</div>
<div class="line"><a name="l02261"></a><span class="lineno"> 2261</span>&#160;            q._selector = selector;</div>
<div class="line"><a name="l02262"></a><span class="lineno"> 2262</span>&#160;            <span class="keywordflow">return</span> q;</div>
<div class="line"><a name="l02263"></a><span class="lineno"> 2263</span>&#160;        }</div>
<div class="line"><a name="l02264"></a><span class="lineno"> 2264</span>&#160;</div>
<div class="line"><a name="l02265"></a><span class="lineno"> 2265</span>&#160;        <span class="keyword">private</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite_command.html">SQLiteCommand</a> GenerateCommand (<span class="keywordtype">string</span> selectionList)</div>
<div class="line"><a name="l02266"></a><span class="lineno"> 2266</span>&#160;        {</div>
<div class="line"><a name="l02267"></a><span class="lineno"> 2267</span>&#160;            <span class="keywordflow">if</span> (_joinInner != null &amp;&amp; _joinOuter != null) {</div>
<div class="line"><a name="l02268"></a><span class="lineno"> 2268</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Joins are not supported.&quot;</span>);</div>
<div class="line"><a name="l02269"></a><span class="lineno"> 2269</span>&#160;            }</div>
<div class="line"><a name="l02270"></a><span class="lineno"> 2270</span>&#160;            <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02271"></a><span class="lineno"> 2271</span>&#160;                var cmdText = <span class="stringliteral">&quot;select &quot;</span> + selectionList + <span class="stringliteral">&quot; from \&quot;&quot;</span> + Table.TableName + <span class="stringliteral">&quot;\&quot;&quot;</span>;</div>
<div class="line"><a name="l02272"></a><span class="lineno"> 2272</span>&#160;                var args = <span class="keyword">new</span> List&lt;object&gt; ();</div>
<div class="line"><a name="l02273"></a><span class="lineno"> 2273</span>&#160;                <span class="keywordflow">if</span> (_where != null) {</div>
<div class="line"><a name="l02274"></a><span class="lineno"> 2274</span>&#160;                    var w = CompileExpr (_where, args);</div>
<div class="line"><a name="l02275"></a><span class="lineno"> 2275</span>&#160;                    cmdText += <span class="stringliteral">&quot; where &quot;</span> + w.CommandText;</div>
<div class="line"><a name="l02276"></a><span class="lineno"> 2276</span>&#160;                }</div>
<div class="line"><a name="l02277"></a><span class="lineno"> 2277</span>&#160;                <span class="keywordflow">if</span> ((_orderBys != null) &amp;&amp; (_orderBys.Count &gt; 0)) {</div>
<div class="line"><a name="l02278"></a><span class="lineno"> 2278</span>&#160;                    var t = string.Join (<span class="stringliteral">&quot;, &quot;</span>, _orderBys.Select (o =&gt; <span class="stringliteral">&quot;\&quot;&quot;</span> + o.ColumnName + <span class="stringliteral">&quot;\&quot;&quot;</span> + (o.Ascending ? <span class="stringliteral">&quot;&quot;</span> : <span class="stringliteral">&quot; desc&quot;</span>)).ToArray ());</div>
<div class="line"><a name="l02279"></a><span class="lineno"> 2279</span>&#160;                    cmdText += <span class="stringliteral">&quot; order by &quot;</span> + t;</div>
<div class="line"><a name="l02280"></a><span class="lineno"> 2280</span>&#160;                }</div>
<div class="line"><a name="l02281"></a><span class="lineno"> 2281</span>&#160;                <span class="keywordflow">if</span> (_limit.HasValue) {</div>
<div class="line"><a name="l02282"></a><span class="lineno"> 2282</span>&#160;                    cmdText += <span class="stringliteral">&quot; limit &quot;</span> + _limit.Value;</div>
<div class="line"><a name="l02283"></a><span class="lineno"> 2283</span>&#160;                }</div>
<div class="line"><a name="l02284"></a><span class="lineno"> 2284</span>&#160;                <span class="keywordflow">if</span> (_offset.HasValue) {</div>
<div class="line"><a name="l02285"></a><span class="lineno"> 2285</span>&#160;                    <span class="keywordflow">if</span> (!_limit.HasValue) {</div>
<div class="line"><a name="l02286"></a><span class="lineno"> 2286</span>&#160;                        cmdText += <span class="stringliteral">&quot; limit -1 &quot;</span>;</div>
<div class="line"><a name="l02287"></a><span class="lineno"> 2287</span>&#160;                    }</div>
<div class="line"><a name="l02288"></a><span class="lineno"> 2288</span>&#160;                    cmdText += <span class="stringliteral">&quot; offset &quot;</span> + _offset.Value;</div>
<div class="line"><a name="l02289"></a><span class="lineno"> 2289</span>&#160;                }</div>
<div class="line"><a name="l02290"></a><span class="lineno"> 2290</span>&#160;                <span class="keywordflow">return</span> Connection.CreateCommand (cmdText, args.ToArray ());</div>
<div class="line"><a name="l02291"></a><span class="lineno"> 2291</span>&#160;            }</div>
<div class="line"><a name="l02292"></a><span class="lineno"> 2292</span>&#160;        }</div>
<div class="line"><a name="l02293"></a><span class="lineno"> 2293</span>&#160;</div>
<div class="line"><a name="l02294"></a><span class="lineno"> 2294</span>&#160;        <span class="keyword">class </span>CompileResult</div>
<div class="line"><a name="l02295"></a><span class="lineno"> 2295</span>&#160;        {</div>
<div class="line"><a name="l02296"></a><span class="lineno"> 2296</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> CommandText { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02297"></a><span class="lineno"> 2297</span>&#160;</div>
<div class="line"><a name="l02298"></a><span class="lineno"> 2298</span>&#160;            <span class="keyword">public</span> <span class="keywordtype">object</span> Value { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l02299"></a><span class="lineno"> 2299</span>&#160;        }</div>
<div class="line"><a name="l02300"></a><span class="lineno"> 2300</span>&#160;</div>
<div class="line"><a name="l02301"></a><span class="lineno"> 2301</span>&#160;        <span class="keyword">private</span> CompileResult CompileExpr (Expression expr, List&lt;object&gt; queryArgs)</div>
<div class="line"><a name="l02302"></a><span class="lineno"> 2302</span>&#160;        {</div>
<div class="line"><a name="l02303"></a><span class="lineno"> 2303</span>&#160;            <span class="keywordflow">if</span> (expr == null) {</div>
<div class="line"><a name="l02304"></a><span class="lineno"> 2304</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Expression is NULL&quot;</span>);</div>
<div class="line"><a name="l02305"></a><span class="lineno"> 2305</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (expr is BinaryExpression) {</div>
<div class="line"><a name="l02306"></a><span class="lineno"> 2306</span>&#160;                var bin = (BinaryExpression)expr;</div>
<div class="line"><a name="l02307"></a><span class="lineno"> 2307</span>&#160;                </div>
<div class="line"><a name="l02308"></a><span class="lineno"> 2308</span>&#160;                var leftr = CompileExpr (bin.Left, queryArgs);</div>
<div class="line"><a name="l02309"></a><span class="lineno"> 2309</span>&#160;                var rightr = CompileExpr (bin.Right, queryArgs);</div>
<div class="line"><a name="l02310"></a><span class="lineno"> 2310</span>&#160;</div>
<div class="line"><a name="l02311"></a><span class="lineno"> 2311</span>&#160;                <span class="comment">//If either side is a parameter and is null, then handle the other side specially (for &quot;is null&quot;/&quot;is not null&quot;)</span></div>
<div class="line"><a name="l02312"></a><span class="lineno"> 2312</span>&#160;                <span class="keywordtype">string</span> text;</div>
<div class="line"><a name="l02313"></a><span class="lineno"> 2313</span>&#160;                <span class="keywordflow">if</span> (leftr.CommandText == <span class="stringliteral">&quot;?&quot;</span> &amp;&amp; leftr.Value == null)</div>
<div class="line"><a name="l02314"></a><span class="lineno"> 2314</span>&#160;                    text = CompileNullBinaryExpression(bin, rightr);</div>
<div class="line"><a name="l02315"></a><span class="lineno"> 2315</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rightr.CommandText == <span class="stringliteral">&quot;?&quot;</span> &amp;&amp; rightr.Value == null)</div>
<div class="line"><a name="l02316"></a><span class="lineno"> 2316</span>&#160;                    text = CompileNullBinaryExpression(bin, leftr);</div>
<div class="line"><a name="l02317"></a><span class="lineno"> 2317</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l02318"></a><span class="lineno"> 2318</span>&#160;                    text = <span class="stringliteral">&quot;(&quot;</span> + leftr.CommandText + <span class="stringliteral">&quot; &quot;</span> + GetSqlName(bin) + <span class="stringliteral">&quot; &quot;</span> + rightr.CommandText + <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l02319"></a><span class="lineno"> 2319</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult { CommandText = text };</div>
<div class="line"><a name="l02320"></a><span class="lineno"> 2320</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (expr.NodeType == ExpressionType.Call) {</div>
<div class="line"><a name="l02321"></a><span class="lineno"> 2321</span>&#160;                </div>
<div class="line"><a name="l02322"></a><span class="lineno"> 2322</span>&#160;                var call = (MethodCallExpression)expr;</div>
<div class="line"><a name="l02323"></a><span class="lineno"> 2323</span>&#160;                var args = <span class="keyword">new</span> CompileResult[call.Arguments.Count];</div>
<div class="line"><a name="l02324"></a><span class="lineno"> 2324</span>&#160;                var obj = call.Object != null ? CompileExpr (call.Object, queryArgs) : null;</div>
<div class="line"><a name="l02325"></a><span class="lineno"> 2325</span>&#160;                </div>
<div class="line"><a name="l02326"></a><span class="lineno"> 2326</span>&#160;                <span class="keywordflow">for</span> (var i = 0; i &lt; args.Length; i++) {</div>
<div class="line"><a name="l02327"></a><span class="lineno"> 2327</span>&#160;                    args [i] = CompileExpr (call.Arguments [i], queryArgs);</div>
<div class="line"><a name="l02328"></a><span class="lineno"> 2328</span>&#160;                }</div>
<div class="line"><a name="l02329"></a><span class="lineno"> 2329</span>&#160;                </div>
<div class="line"><a name="l02330"></a><span class="lineno"> 2330</span>&#160;                var sqlCall = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l02331"></a><span class="lineno"> 2331</span>&#160;                </div>
<div class="line"><a name="l02332"></a><span class="lineno"> 2332</span>&#160;                <span class="keywordflow">if</span> (call.Method.Name == <span class="stringliteral">&quot;Like&quot;</span> &amp;&amp; args.Length == 2) {</div>
<div class="line"><a name="l02333"></a><span class="lineno"> 2333</span>&#160;                    sqlCall = <span class="stringliteral">&quot;(&quot;</span> + args [0].CommandText + <span class="stringliteral">&quot; like &quot;</span> + args [1].CommandText + <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l02334"></a><span class="lineno"> 2334</span>&#160;                }</div>
<div class="line"><a name="l02335"></a><span class="lineno"> 2335</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (call.Method.Name == <span class="stringliteral">&quot;Contains&quot;</span> &amp;&amp; args.Length == 2) {</div>
<div class="line"><a name="l02336"></a><span class="lineno"> 2336</span>&#160;                    sqlCall = <span class="stringliteral">&quot;(&quot;</span> + args [1].CommandText + <span class="stringliteral">&quot; in &quot;</span> + args [0].CommandText + <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l02337"></a><span class="lineno"> 2337</span>&#160;                }</div>
<div class="line"><a name="l02338"></a><span class="lineno"> 2338</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (call.Method.Name == <span class="stringliteral">&quot;Contains&quot;</span> &amp;&amp; args.Length == 1) {</div>
<div class="line"><a name="l02339"></a><span class="lineno"> 2339</span>&#160;                    <span class="keywordflow">if</span> (call.Object != null &amp;&amp; call.Object.Type == typeof(<span class="keywordtype">string</span>)) {</div>
<div class="line"><a name="l02340"></a><span class="lineno"> 2340</span>&#160;                        sqlCall = <span class="stringliteral">&quot;(&quot;</span> + obj.CommandText + <span class="stringliteral">&quot; like (&#39;%&#39; || &quot;</span> + args [0].CommandText + <span class="stringliteral">&quot; || &#39;%&#39;))&quot;</span>;</div>
<div class="line"><a name="l02341"></a><span class="lineno"> 2341</span>&#160;                    }</div>
<div class="line"><a name="l02342"></a><span class="lineno"> 2342</span>&#160;                    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02343"></a><span class="lineno"> 2343</span>&#160;                        sqlCall = <span class="stringliteral">&quot;(&quot;</span> + args [0].CommandText + <span class="stringliteral">&quot; in &quot;</span> + obj.CommandText + <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l02344"></a><span class="lineno"> 2344</span>&#160;                    }</div>
<div class="line"><a name="l02345"></a><span class="lineno"> 2345</span>&#160;                }</div>
<div class="line"><a name="l02346"></a><span class="lineno"> 2346</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (call.Method.Name == <span class="stringliteral">&quot;StartsWith&quot;</span> &amp;&amp; args.Length == 1) {</div>
<div class="line"><a name="l02347"></a><span class="lineno"> 2347</span>&#160;                    sqlCall = <span class="stringliteral">&quot;(&quot;</span> + obj.CommandText + <span class="stringliteral">&quot; like (&quot;</span> + args [0].CommandText + <span class="stringliteral">&quot; || &#39;%&#39;))&quot;</span>;</div>
<div class="line"><a name="l02348"></a><span class="lineno"> 2348</span>&#160;                }</div>
<div class="line"><a name="l02349"></a><span class="lineno"> 2349</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (call.Method.Name == <span class="stringliteral">&quot;EndsWith&quot;</span> &amp;&amp; args.Length == 1) {</div>
<div class="line"><a name="l02350"></a><span class="lineno"> 2350</span>&#160;                    sqlCall = <span class="stringliteral">&quot;(&quot;</span> + obj.CommandText + <span class="stringliteral">&quot; like (&#39;%&#39; || &quot;</span> + args [0].CommandText + <span class="stringliteral">&quot;))&quot;</span>;</div>
<div class="line"><a name="l02351"></a><span class="lineno"> 2351</span>&#160;                }</div>
<div class="line"><a name="l02352"></a><span class="lineno"> 2352</span>&#160;                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (call.Method.Name == <span class="stringliteral">&quot;Equals&quot;</span> &amp;&amp; args.Length == 1) {</div>
<div class="line"><a name="l02353"></a><span class="lineno"> 2353</span>&#160;                    sqlCall = <span class="stringliteral">&quot;(&quot;</span> + obj.CommandText + <span class="stringliteral">&quot; = (&quot;</span> + args[0].CommandText + <span class="stringliteral">&quot;))&quot;</span>;</div>
<div class="line"><a name="l02354"></a><span class="lineno"> 2354</span>&#160;                }</div>
<div class="line"><a name="l02355"></a><span class="lineno"> 2355</span>&#160;                <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02356"></a><span class="lineno"> 2356</span>&#160;                    sqlCall = call.Method.Name.ToLower () + <span class="stringliteral">&quot;(&quot;</span> + <span class="keywordtype">string</span>.Join (<span class="stringliteral">&quot;,&quot;</span>, args.Select (a =&gt; a.CommandText).ToArray ()) + <span class="stringliteral">&quot;)&quot;</span>;</div>
<div class="line"><a name="l02357"></a><span class="lineno"> 2357</span>&#160;                }</div>
<div class="line"><a name="l02358"></a><span class="lineno"> 2358</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult { CommandText = sqlCall };</div>
<div class="line"><a name="l02359"></a><span class="lineno"> 2359</span>&#160;                </div>
<div class="line"><a name="l02360"></a><span class="lineno"> 2360</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (expr.NodeType == ExpressionType.Constant) {</div>
<div class="line"><a name="l02361"></a><span class="lineno"> 2361</span>&#160;                var c = (ConstantExpression)expr;</div>
<div class="line"><a name="l02362"></a><span class="lineno"> 2362</span>&#160;                queryArgs.Add (c.Value);</div>
<div class="line"><a name="l02363"></a><span class="lineno"> 2363</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult {</div>
<div class="line"><a name="l02364"></a><span class="lineno"> 2364</span>&#160;                    CommandText = <span class="stringliteral">&quot;?&quot;</span>,</div>
<div class="line"><a name="l02365"></a><span class="lineno"> 2365</span>&#160;                    Value = c.Value</div>
<div class="line"><a name="l02366"></a><span class="lineno"> 2366</span>&#160;                };</div>
<div class="line"><a name="l02367"></a><span class="lineno"> 2367</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (expr.NodeType == ExpressionType.Convert) {</div>
<div class="line"><a name="l02368"></a><span class="lineno"> 2368</span>&#160;                var u = (UnaryExpression)expr;</div>
<div class="line"><a name="l02369"></a><span class="lineno"> 2369</span>&#160;                var ty = u.Type;</div>
<div class="line"><a name="l02370"></a><span class="lineno"> 2370</span>&#160;                var valr = CompileExpr (u.Operand, queryArgs);</div>
<div class="line"><a name="l02371"></a><span class="lineno"> 2371</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult {</div>
<div class="line"><a name="l02372"></a><span class="lineno"> 2372</span>&#160;                    CommandText = valr.CommandText,</div>
<div class="line"><a name="l02373"></a><span class="lineno"> 2373</span>&#160;                    Value = valr.Value != null ? ConvertTo (valr.Value, ty) : null</div>
<div class="line"><a name="l02374"></a><span class="lineno"> 2374</span>&#160;                };</div>
<div class="line"><a name="l02375"></a><span class="lineno"> 2375</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (expr.NodeType == ExpressionType.MemberAccess) {</div>
<div class="line"><a name="l02376"></a><span class="lineno"> 2376</span>&#160;                var mem = (MemberExpression)expr;</div>
<div class="line"><a name="l02377"></a><span class="lineno"> 2377</span>&#160;                </div>
<div class="line"><a name="l02378"></a><span class="lineno"> 2378</span>&#160;                <span class="keywordflow">if</span> (mem.Expression!=null &amp;&amp; mem.Expression.NodeType == ExpressionType.Parameter) {</div>
<div class="line"><a name="l02379"></a><span class="lineno"> 2379</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l02380"></a><span class="lineno"> 2380</span>&#160;                    <span class="comment">// This is a column of our table, output just the column name</span></div>
<div class="line"><a name="l02381"></a><span class="lineno"> 2381</span>&#160;                    <span class="comment">// Need to translate it if that column name is mapped</span></div>
<div class="line"><a name="l02382"></a><span class="lineno"> 2382</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l02383"></a><span class="lineno"> 2383</span>&#160;                    var columnName = Table.FindColumnWithPropertyName (mem.Member.Name).Name;</div>
<div class="line"><a name="l02384"></a><span class="lineno"> 2384</span>&#160;                    <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult { CommandText = <span class="stringliteral">&quot;\&quot;&quot;</span> + columnName + <span class="stringliteral">&quot;\&quot;&quot;</span> };</div>
<div class="line"><a name="l02385"></a><span class="lineno"> 2385</span>&#160;                } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02386"></a><span class="lineno"> 2386</span>&#160;                    <span class="keywordtype">object</span> obj = null;</div>
<div class="line"><a name="l02387"></a><span class="lineno"> 2387</span>&#160;                    <span class="keywordflow">if</span> (mem.Expression != null) {</div>
<div class="line"><a name="l02388"></a><span class="lineno"> 2388</span>&#160;                        var r = CompileExpr (mem.Expression, queryArgs);</div>
<div class="line"><a name="l02389"></a><span class="lineno"> 2389</span>&#160;                        <span class="keywordflow">if</span> (r.Value == null) {</div>
<div class="line"><a name="l02390"></a><span class="lineno"> 2390</span>&#160;                            <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Member access failed to compile expression&quot;</span>);</div>
<div class="line"><a name="l02391"></a><span class="lineno"> 2391</span>&#160;                        }</div>
<div class="line"><a name="l02392"></a><span class="lineno"> 2392</span>&#160;                        <span class="keywordflow">if</span> (r.CommandText == <span class="stringliteral">&quot;?&quot;</span>) {</div>
<div class="line"><a name="l02393"></a><span class="lineno"> 2393</span>&#160;                            queryArgs.RemoveAt (queryArgs.Count - 1);</div>
<div class="line"><a name="l02394"></a><span class="lineno"> 2394</span>&#160;                        }</div>
<div class="line"><a name="l02395"></a><span class="lineno"> 2395</span>&#160;                        obj = r.Value;</div>
<div class="line"><a name="l02396"></a><span class="lineno"> 2396</span>&#160;                    }</div>
<div class="line"><a name="l02397"></a><span class="lineno"> 2397</span>&#160;                    </div>
<div class="line"><a name="l02398"></a><span class="lineno"> 2398</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l02399"></a><span class="lineno"> 2399</span>&#160;                    <span class="comment">// Get the member value</span></div>
<div class="line"><a name="l02400"></a><span class="lineno"> 2400</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l02401"></a><span class="lineno"> 2401</span>&#160;                    <span class="keywordtype">object</span> val = null;</div>
<div class="line"><a name="l02402"></a><span class="lineno"> 2402</span>&#160;                    </div>
<div class="line"><a name="l02403"></a><span class="lineno"> 2403</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l02404"></a><span class="lineno"> 2404</span>&#160;<span class="preprocessor"></span>                    <span class="keywordflow">if</span> (mem.Member.MemberType == MemberTypes.Property) {</div>
<div class="line"><a name="l02405"></a><span class="lineno"> 2405</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02406"></a><span class="lineno"> 2406</span>&#160;<span class="preprocessor"></span>                    <span class="keywordflow">if</span> (mem.Member is PropertyInfo) {</div>
<div class="line"><a name="l02407"></a><span class="lineno"> 2407</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02408"></a><span class="lineno"> 2408</span>&#160;<span class="preprocessor"></span>                        var m = (PropertyInfo)mem.Member;</div>
<div class="line"><a name="l02409"></a><span class="lineno"> 2409</span>&#160;                        val = m.GetValue (obj, null);</div>
<div class="line"><a name="l02410"></a><span class="lineno"> 2410</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l02411"></a><span class="lineno"> 2411</span>&#160;<span class="preprocessor"></span>                    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mem.Member.MemberType == MemberTypes.Field) {</div>
<div class="line"><a name="l02412"></a><span class="lineno"> 2412</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02413"></a><span class="lineno"> 2413</span>&#160;<span class="preprocessor"></span>                    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mem.Member is FieldInfo) {</div>
<div class="line"><a name="l02414"></a><span class="lineno"> 2414</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02415"></a><span class="lineno"> 2415</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#if SILVERLIGHT</span></div>
<div class="line"><a name="l02416"></a><span class="lineno"> 2416</span>&#160;<span class="preprocessor"></span>                        val = Expression.Lambda (expr).Compile ().DynamicInvoke ();</div>
<div class="line"><a name="l02417"></a><span class="lineno"> 2417</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02418"></a><span class="lineno"> 2418</span>&#160;<span class="preprocessor"></span>                        var m = (FieldInfo)mem.Member;</div>
<div class="line"><a name="l02419"></a><span class="lineno"> 2419</span>&#160;                        val = m.GetValue (obj);</div>
<div class="line"><a name="l02420"></a><span class="lineno"> 2420</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02421"></a><span class="lineno"> 2421</span>&#160;<span class="preprocessor"></span>                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02422"></a><span class="lineno"> 2422</span>&#160;<span class="preprocessor">#if !NETFX_CORE</span></div>
<div class="line"><a name="l02423"></a><span class="lineno"> 2423</span>&#160;<span class="preprocessor"></span>                        <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;MemberExpr: &quot;</span> + mem.Member.MemberType.ToString ());</div>
<div class="line"><a name="l02424"></a><span class="lineno"> 2424</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02425"></a><span class="lineno"> 2425</span>&#160;<span class="preprocessor"></span>                        <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;MemberExpr: &quot;</span> + mem.Member.DeclaringType.ToString ());</div>
<div class="line"><a name="l02426"></a><span class="lineno"> 2426</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02427"></a><span class="lineno"> 2427</span>&#160;<span class="preprocessor"></span>                    }</div>
<div class="line"><a name="l02428"></a><span class="lineno"> 2428</span>&#160;                    </div>
<div class="line"><a name="l02429"></a><span class="lineno"> 2429</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l02430"></a><span class="lineno"> 2430</span>&#160;                    <span class="comment">// Work special magic for enumerables</span></div>
<div class="line"><a name="l02431"></a><span class="lineno"> 2431</span>&#160;                    <span class="comment">//</span></div>
<div class="line"><a name="l02432"></a><span class="lineno"> 2432</span>&#160;                    <span class="keywordflow">if</span> (val != null &amp;&amp; val is System.Collections.IEnumerable &amp;&amp; !(val is <span class="keywordtype">string</span>)) {</div>
<div class="line"><a name="l02433"></a><span class="lineno"> 2433</span>&#160;                        var sb = <span class="keyword">new</span> System.Text.StringBuilder();</div>
<div class="line"><a name="l02434"></a><span class="lineno"> 2434</span>&#160;                        sb.Append(<span class="stringliteral">&quot;(&quot;</span>);</div>
<div class="line"><a name="l02435"></a><span class="lineno"> 2435</span>&#160;                        var head = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l02436"></a><span class="lineno"> 2436</span>&#160;                        <span class="keywordflow">foreach</span> (var a <span class="keywordflow">in</span> (System.Collections.IEnumerable)val) {</div>
<div class="line"><a name="l02437"></a><span class="lineno"> 2437</span>&#160;                            queryArgs.Add(a);</div>
<div class="line"><a name="l02438"></a><span class="lineno"> 2438</span>&#160;                            sb.Append(head);</div>
<div class="line"><a name="l02439"></a><span class="lineno"> 2439</span>&#160;                            sb.Append(<span class="stringliteral">&quot;?&quot;</span>);</div>
<div class="line"><a name="l02440"></a><span class="lineno"> 2440</span>&#160;                            head = <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a name="l02441"></a><span class="lineno"> 2441</span>&#160;                        }</div>
<div class="line"><a name="l02442"></a><span class="lineno"> 2442</span>&#160;                        sb.Append(<span class="stringliteral">&quot;)&quot;</span>);</div>
<div class="line"><a name="l02443"></a><span class="lineno"> 2443</span>&#160;                        <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult {</div>
<div class="line"><a name="l02444"></a><span class="lineno"> 2444</span>&#160;                            CommandText = sb.ToString(),</div>
<div class="line"><a name="l02445"></a><span class="lineno"> 2445</span>&#160;                            Value = val</div>
<div class="line"><a name="l02446"></a><span class="lineno"> 2446</span>&#160;                        };</div>
<div class="line"><a name="l02447"></a><span class="lineno"> 2447</span>&#160;                    }</div>
<div class="line"><a name="l02448"></a><span class="lineno"> 2448</span>&#160;                    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02449"></a><span class="lineno"> 2449</span>&#160;                        queryArgs.Add (val);</div>
<div class="line"><a name="l02450"></a><span class="lineno"> 2450</span>&#160;                        <span class="keywordflow">return</span> <span class="keyword">new</span> CompileResult {</div>
<div class="line"><a name="l02451"></a><span class="lineno"> 2451</span>&#160;                            CommandText = <span class="stringliteral">&quot;?&quot;</span>,</div>
<div class="line"><a name="l02452"></a><span class="lineno"> 2452</span>&#160;                            Value = val</div>
<div class="line"><a name="l02453"></a><span class="lineno"> 2453</span>&#160;                        };</div>
<div class="line"><a name="l02454"></a><span class="lineno"> 2454</span>&#160;                    }</div>
<div class="line"><a name="l02455"></a><span class="lineno"> 2455</span>&#160;                }</div>
<div class="line"><a name="l02456"></a><span class="lineno"> 2456</span>&#160;            }</div>
<div class="line"><a name="l02457"></a><span class="lineno"> 2457</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException (<span class="stringliteral">&quot;Cannot compile: &quot;</span> + expr.NodeType.ToString ());</div>
<div class="line"><a name="l02458"></a><span class="lineno"> 2458</span>&#160;        }</div>
<div class="line"><a name="l02459"></a><span class="lineno"> 2459</span>&#160;</div>
<div class="line"><a name="l02460"></a><span class="lineno"> 2460</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">object</span> ConvertTo (<span class="keywordtype">object</span> obj, Type t)</div>
<div class="line"><a name="l02461"></a><span class="lineno"> 2461</span>&#160;        {</div>
<div class="line"><a name="l02462"></a><span class="lineno"> 2462</span>&#160;            Type nut = Nullable.GetUnderlyingType(t);</div>
<div class="line"><a name="l02463"></a><span class="lineno"> 2463</span>&#160;            </div>
<div class="line"><a name="l02464"></a><span class="lineno"> 2464</span>&#160;            <span class="keywordflow">if</span> (nut != null) {</div>
<div class="line"><a name="l02465"></a><span class="lineno"> 2465</span>&#160;                <span class="keywordflow">if</span> (obj == null) <span class="keywordflow">return</span> null;               </div>
<div class="line"><a name="l02466"></a><span class="lineno"> 2466</span>&#160;                <span class="keywordflow">return</span> Convert.ChangeType (obj, nut);</div>
<div class="line"><a name="l02467"></a><span class="lineno"> 2467</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02468"></a><span class="lineno"> 2468</span>&#160;                <span class="keywordflow">return</span> Convert.ChangeType (obj, t);</div>
<div class="line"><a name="l02469"></a><span class="lineno"> 2469</span>&#160;            }</div>
<div class="line"><a name="l02470"></a><span class="lineno"> 2470</span>&#160;        }</div>
<div class="line"><a name="l02471"></a><span class="lineno"> 2471</span>&#160;</div>
<div class="line"><a name="l02476"></a><span class="lineno"> 2476</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">string</span> CompileNullBinaryExpression(BinaryExpression expression, CompileResult parameter)</div>
<div class="line"><a name="l02477"></a><span class="lineno"> 2477</span>&#160;        {</div>
<div class="line"><a name="l02478"></a><span class="lineno"> 2478</span>&#160;            <span class="keywordflow">if</span> (expression.NodeType == ExpressionType.Equal)</div>
<div class="line"><a name="l02479"></a><span class="lineno"> 2479</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;(&quot;</span> + parameter.CommandText + <span class="stringliteral">&quot; is ?)&quot;</span>;</div>
<div class="line"><a name="l02480"></a><span class="lineno"> 2480</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (expression.NodeType == ExpressionType.NotEqual)</div>
<div class="line"><a name="l02481"></a><span class="lineno"> 2481</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;(&quot;</span> + parameter.CommandText + <span class="stringliteral">&quot; is not ?)&quot;</span>;</div>
<div class="line"><a name="l02482"></a><span class="lineno"> 2482</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l02483"></a><span class="lineno"> 2483</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> NotSupportedException(<span class="stringliteral">&quot;Cannot compile Null-BinaryExpression with type &quot;</span> + expression.NodeType.ToString());</div>
<div class="line"><a name="l02484"></a><span class="lineno"> 2484</span>&#160;        }</div>
<div class="line"><a name="l02485"></a><span class="lineno"> 2485</span>&#160;</div>
<div class="line"><a name="l02486"></a><span class="lineno"> 2486</span>&#160;        <span class="keywordtype">string</span> GetSqlName (Expression expr)</div>
<div class="line"><a name="l02487"></a><span class="lineno"> 2487</span>&#160;        {</div>
<div class="line"><a name="l02488"></a><span class="lineno"> 2488</span>&#160;            var n = expr.NodeType;</div>
<div class="line"><a name="l02489"></a><span class="lineno"> 2489</span>&#160;            <span class="keywordflow">if</span> (n == ExpressionType.GreaterThan)</div>
<div class="line"><a name="l02490"></a><span class="lineno"> 2490</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;&gt;&quot;</span>; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.GreaterThanOrEqual) {</div>
<div class="line"><a name="l02491"></a><span class="lineno"> 2491</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;&gt;=&quot;</span>;</div>
<div class="line"><a name="l02492"></a><span class="lineno"> 2492</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.LessThan) {</div>
<div class="line"><a name="l02493"></a><span class="lineno"> 2493</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;&lt;&quot;</span>;</div>
<div class="line"><a name="l02494"></a><span class="lineno"> 2494</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.LessThanOrEqual) {</div>
<div class="line"><a name="l02495"></a><span class="lineno"> 2495</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;&lt;=&quot;</span>;</div>
<div class="line"><a name="l02496"></a><span class="lineno"> 2496</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.And) {</div>
<div class="line"><a name="l02497"></a><span class="lineno"> 2497</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;&amp;&quot;</span>;</div>
<div class="line"><a name="l02498"></a><span class="lineno"> 2498</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.AndAlso) {</div>
<div class="line"><a name="l02499"></a><span class="lineno"> 2499</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;and&quot;</span>;</div>
<div class="line"><a name="l02500"></a><span class="lineno"> 2500</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.Or) {</div>
<div class="line"><a name="l02501"></a><span class="lineno"> 2501</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;|&quot;</span>;</div>
<div class="line"><a name="l02502"></a><span class="lineno"> 2502</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.OrElse) {</div>
<div class="line"><a name="l02503"></a><span class="lineno"> 2503</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;or&quot;</span>;</div>
<div class="line"><a name="l02504"></a><span class="lineno"> 2504</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.Equal) {</div>
<div class="line"><a name="l02505"></a><span class="lineno"> 2505</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;=&quot;</span>;</div>
<div class="line"><a name="l02506"></a><span class="lineno"> 2506</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == ExpressionType.NotEqual) {</div>
<div class="line"><a name="l02507"></a><span class="lineno"> 2507</span>&#160;                <span class="keywordflow">return</span> <span class="stringliteral">&quot;!=&quot;</span>;</div>
<div class="line"><a name="l02508"></a><span class="lineno"> 2508</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l02509"></a><span class="lineno"> 2509</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> System.NotSupportedException (<span class="stringliteral">&quot;Cannot get SQL for: &quot;</span> + n.ToString ());</div>
<div class="line"><a name="l02510"></a><span class="lineno"> 2510</span>&#160;            }</div>
<div class="line"><a name="l02511"></a><span class="lineno"> 2511</span>&#160;        }</div>
<div class="line"><a name="l02512"></a><span class="lineno"> 2512</span>&#160;        </div>
<div class="line"><a name="l02513"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#afc74d6d1b8ca720c3a26d6a0c0ca6b86"> 2513</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#afc74d6d1b8ca720c3a26d6a0c0ca6b86">Count</a> ()</div>
<div class="line"><a name="l02514"></a><span class="lineno"> 2514</span>&#160;        {</div>
<div class="line"><a name="l02515"></a><span class="lineno"> 2515</span>&#160;            <span class="keywordflow">return</span> GenerateCommand(<span class="stringliteral">&quot;count(*)&quot;</span>).ExecuteScalar&lt;<span class="keywordtype">int</span>&gt; ();           </div>
<div class="line"><a name="l02516"></a><span class="lineno"> 2516</span>&#160;        }</div>
<div class="line"><a name="l02517"></a><span class="lineno"> 2517</span>&#160;</div>
<div class="line"><a name="l02518"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a3929d540dd0a888291077626d4690202"> 2518</a></span>&#160;        <span class="keyword">public</span> IEnumerator&lt;T&gt; <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a3929d540dd0a888291077626d4690202">GetEnumerator</a> ()</div>
<div class="line"><a name="l02519"></a><span class="lineno"> 2519</span>&#160;        {</div>
<div class="line"><a name="l02520"></a><span class="lineno"> 2520</span>&#160;            <span class="keywordflow">if</span> (!_deferred)</div>
<div class="line"><a name="l02521"></a><span class="lineno"> 2521</span>&#160;                <span class="keywordflow">return</span> GenerateCommand(<span class="stringliteral">&quot;*&quot;</span>).ExecuteQuery&lt;T&gt;().GetEnumerator();</div>
<div class="line"><a name="l02522"></a><span class="lineno"> 2522</span>&#160;</div>
<div class="line"><a name="l02523"></a><span class="lineno"> 2523</span>&#160;            <span class="keywordflow">return</span> GenerateCommand(<span class="stringliteral">&quot;*&quot;</span>).ExecuteDeferredQuery&lt;T&gt;().GetEnumerator();</div>
<div class="line"><a name="l02524"></a><span class="lineno"> 2524</span>&#160;        }</div>
<div class="line"><a name="l02525"></a><span class="lineno"> 2525</span>&#160;</div>
<div class="line"><a name="l02526"></a><span class="lineno"> 2526</span>&#160;        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()</div>
<div class="line"><a name="l02527"></a><span class="lineno"> 2527</span>&#160;        {</div>
<div class="line"><a name="l02528"></a><span class="lineno"> 2528</span>&#160;            <span class="keywordflow">return</span> GetEnumerator ();</div>
<div class="line"><a name="l02529"></a><span class="lineno"> 2529</span>&#160;        }</div>
<div class="line"><a name="l02530"></a><span class="lineno"> 2530</span>&#160;</div>
<div class="line"><a name="l02531"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a5d9bc1e1c29e1da74671e17033f2badb"> 2531</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a5d9bc1e1c29e1da74671e17033f2badb">First</a> ()</div>
<div class="line"><a name="l02532"></a><span class="lineno"> 2532</span>&#160;        {</div>
<div class="line"><a name="l02533"></a><span class="lineno"> 2533</span>&#160;            var query = Take (1);</div>
<div class="line"><a name="l02534"></a><span class="lineno"> 2534</span>&#160;            <span class="keywordflow">return</span> query.ToList&lt;T&gt;().First ();</div>
<div class="line"><a name="l02535"></a><span class="lineno"> 2535</span>&#160;        }</div>
<div class="line"><a name="l02536"></a><span class="lineno"> 2536</span>&#160;</div>
<div class="line"><a name="l02537"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a517c2275d7bd055d07f0b810cb8ae179"> 2537</a></span>&#160;        <span class="keyword">public</span> T <a class="code" href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a517c2275d7bd055d07f0b810cb8ae179">FirstOrDefault</a> ()</div>
<div class="line"><a name="l02538"></a><span class="lineno"> 2538</span>&#160;        {</div>
<div class="line"><a name="l02539"></a><span class="lineno"> 2539</span>&#160;            var query = this.Take (1);</div>
<div class="line"><a name="l02540"></a><span class="lineno"> 2540</span>&#160;            <span class="keywordflow">return</span> query.ToList&lt;T&gt;().FirstOrDefault ();</div>
<div class="line"><a name="l02541"></a><span class="lineno"> 2541</span>&#160;        }</div>
<div class="line"><a name="l02542"></a><span class="lineno"> 2542</span>&#160;    }</div>
<div class="line"><a name="l02543"></a><span class="lineno"> 2543</span>&#160;</div>
<div class="line"><a name="l02544"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html"> 2544</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">class </span><a class="code" href="class_s_q_lite_1_1_s_q_lite3.html">SQLite3</a></div>
<div class="line"><a name="l02545"></a><span class="lineno"> 2545</span>&#160;    {</div>
<div class="line"><a name="l02546"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732"> 2546</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a> : <span class="keywordtype">int</span></div>
<div class="line"><a name="l02547"></a><span class="lineno"> 2547</span>&#160;        {</div>
<div class="line"><a name="l02548"></a><span class="lineno"> 2548</span>&#160;            OK = 0,</div>
<div class="line"><a name="l02549"></a><span class="lineno"> 2549</span>&#160;            Error = 1,</div>
<div class="line"><a name="l02550"></a><span class="lineno"> 2550</span>&#160;            Internal = 2,</div>
<div class="line"><a name="l02551"></a><span class="lineno"> 2551</span>&#160;            Perm = 3,</div>
<div class="line"><a name="l02552"></a><span class="lineno"> 2552</span>&#160;            Abort = 4,</div>
<div class="line"><a name="l02553"></a><span class="lineno"> 2553</span>&#160;            Busy = 5,</div>
<div class="line"><a name="l02554"></a><span class="lineno"> 2554</span>&#160;            Locked = 6,</div>
<div class="line"><a name="l02555"></a><span class="lineno"> 2555</span>&#160;            NoMem = 7,</div>
<div class="line"><a name="l02556"></a><span class="lineno"> 2556</span>&#160;            <a class="code" href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a131fb182a881796e7606ed6da27f1197">ReadOnly</a> = 8,</div>
<div class="line"><a name="l02557"></a><span class="lineno"> 2557</span>&#160;            Interrupt = 9,</div>
<div class="line"><a name="l02558"></a><span class="lineno"> 2558</span>&#160;            IOError = 10,</div>
<div class="line"><a name="l02559"></a><span class="lineno"> 2559</span>&#160;            Corrupt = 11,</div>
<div class="line"><a name="l02560"></a><span class="lineno"> 2560</span>&#160;            NotFound = 12,</div>
<div class="line"><a name="l02561"></a><span class="lineno"> 2561</span>&#160;            Full = 13,</div>
<div class="line"><a name="l02562"></a><span class="lineno"> 2562</span>&#160;            CannotOpen = 14,</div>
<div class="line"><a name="l02563"></a><span class="lineno"> 2563</span>&#160;            LockErr = 15,</div>
<div class="line"><a name="l02564"></a><span class="lineno"> 2564</span>&#160;            Empty = 16,</div>
<div class="line"><a name="l02565"></a><span class="lineno"> 2565</span>&#160;            SchemaChngd = 17,</div>
<div class="line"><a name="l02566"></a><span class="lineno"> 2566</span>&#160;            TooBig = 18,</div>
<div class="line"><a name="l02567"></a><span class="lineno"> 2567</span>&#160;            Constraint = 19,</div>
<div class="line"><a name="l02568"></a><span class="lineno"> 2568</span>&#160;            Mismatch = 20,</div>
<div class="line"><a name="l02569"></a><span class="lineno"> 2569</span>&#160;            Misuse = 21,</div>
<div class="line"><a name="l02570"></a><span class="lineno"> 2570</span>&#160;            NotImplementedLFS = 22,</div>
<div class="line"><a name="l02571"></a><span class="lineno"> 2571</span>&#160;            AccessDenied = 23,</div>
<div class="line"><a name="l02572"></a><span class="lineno"> 2572</span>&#160;            Format = 24,</div>
<div class="line"><a name="l02573"></a><span class="lineno"> 2573</span>&#160;            Range = 25,</div>
<div class="line"><a name="l02574"></a><span class="lineno"> 2574</span>&#160;            NonDBFile = 26,</div>
<div class="line"><a name="l02575"></a><span class="lineno"> 2575</span>&#160;            Row = 100,</div>
<div class="line"><a name="l02576"></a><span class="lineno"> 2576</span>&#160;            Done = 101</div>
<div class="line"><a name="l02577"></a><span class="lineno"> 2577</span>&#160;        }</div>
<div class="line"><a name="l02578"></a><span class="lineno"> 2578</span>&#160;</div>
<div class="line"><a name="l02579"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#a1b868498215ae2491a6ecf1f1669c4db"> 2579</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1b868498215ae2491a6ecf1f1669c4db">ConfigOption</a> : <span class="keywordtype">int</span></div>
<div class="line"><a name="l02580"></a><span class="lineno"> 2580</span>&#160;        {</div>
<div class="line"><a name="l02581"></a><span class="lineno"> 2581</span>&#160;            SingleThread = 1,</div>
<div class="line"><a name="l02582"></a><span class="lineno"> 2582</span>&#160;            MultiThread = 2,</div>
<div class="line"><a name="l02583"></a><span class="lineno"> 2583</span>&#160;            Serialized = 3</div>
<div class="line"><a name="l02584"></a><span class="lineno"> 2584</span>&#160;        }</div>
<div class="line"><a name="l02585"></a><span class="lineno"> 2585</span>&#160;</div>
<div class="line"><a name="l02586"></a><span class="lineno"> 2586</span>&#160;<span class="preprocessor">#if !USE_CSHARP_SQLITE &amp;&amp; !USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l02587"></a><span class="lineno"> 2587</span>&#160;<span class="preprocessor"></span>        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_open&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02588"></a><span class="lineno"> 2588</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Open ([MarshalAs(UnmanagedType.LPStr)] <span class="keywordtype">string</span> filename, out IntPtr db);</div>
<div class="line"><a name="l02589"></a><span class="lineno"> 2589</span>&#160;</div>
<div class="line"><a name="l02590"></a><span class="lineno"> 2590</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_open_v2&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02591"></a><span class="lineno"> 2591</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Open ([MarshalAs(UnmanagedType.LPStr)] <span class="keywordtype">string</span> filename, out IntPtr db, <span class="keywordtype">int</span> flags, IntPtr zvfs);</div>
<div class="line"><a name="l02592"></a><span class="lineno"> 2592</span>&#160;        </div>
<div class="line"><a name="l02593"></a><span class="lineno"> 2593</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_open_v2&quot;</span>, CallingConvention = CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02594"></a><span class="lineno"> 2594</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Open(byte[] filename, out IntPtr db, <span class="keywordtype">int</span> flags, IntPtr zvfs);</div>
<div class="line"><a name="l02595"></a><span class="lineno"> 2595</span>&#160;</div>
<div class="line"><a name="l02596"></a><span class="lineno"> 2596</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_open16&quot;</span>, CallingConvention = CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02597"></a><span class="lineno"> 2597</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Open16([MarshalAs(UnmanagedType.LPWStr)] <span class="keywordtype">string</span> filename, out IntPtr db);</div>
<div class="line"><a name="l02598"></a><span class="lineno"> 2598</span>&#160;</div>
<div class="line"><a name="l02599"></a><span class="lineno"> 2599</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_close&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02600"></a><span class="lineno"> 2600</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a74160304a4a218b7508220106eeb10d0">Close</a> (IntPtr db);</div>
<div class="line"><a name="l02601"></a><span class="lineno"> 2601</span>&#160;</div>
<div class="line"><a name="l02602"></a><span class="lineno"> 2602</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_config&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02603"></a><span class="lineno"> 2603</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Config (ConfigOption option);</div>
<div class="line"><a name="l02604"></a><span class="lineno"> 2604</span>&#160;</div>
<div class="line"><a name="l02605"></a><span class="lineno"> 2605</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_win32_set_directory&quot;</span>, CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Unicode)]</div>
<div class="line"><a name="l02606"></a><span class="lineno"> 2606</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> SetDirectory (uint directoryType, <span class="keywordtype">string</span> directoryPath);</div>
<div class="line"><a name="l02607"></a><span class="lineno"> 2607</span>&#160;</div>
<div class="line"><a name="l02608"></a><span class="lineno"> 2608</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_busy_timeout&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02609"></a><span class="lineno"> 2609</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#abb2b70df282aa2f1af07789db65db1dd">BusyTimeout</a> (IntPtr db, <span class="keywordtype">int</span> milliseconds);</div>
<div class="line"><a name="l02610"></a><span class="lineno"> 2610</span>&#160;</div>
<div class="line"><a name="l02611"></a><span class="lineno"> 2611</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_changes&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02612"></a><span class="lineno"> 2612</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> Changes (IntPtr db);</div>
<div class="line"><a name="l02613"></a><span class="lineno"> 2613</span>&#160;</div>
<div class="line"><a name="l02614"></a><span class="lineno"> 2614</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_prepare_v2&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02615"></a><span class="lineno"> 2615</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Prepare2 (IntPtr db, [MarshalAs(UnmanagedType.LPStr)] <span class="keywordtype">string</span> sql, <span class="keywordtype">int</span> numBytes, out IntPtr stmt, IntPtr pzTail);</div>
<div class="line"><a name="l02616"></a><span class="lineno"> 2616</span>&#160;</div>
<div class="line"><a name="l02617"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#a89dee8d36b455dda9cf587f12ce541ec"> 2617</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> IntPtr <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a89dee8d36b455dda9cf587f12ce541ec">Prepare2</a> (IntPtr db, <span class="keywordtype">string</span> query)</div>
<div class="line"><a name="l02618"></a><span class="lineno"> 2618</span>&#160;        {</div>
<div class="line"><a name="l02619"></a><span class="lineno"> 2619</span>&#160;            IntPtr stmt;</div>
<div class="line"><a name="l02620"></a><span class="lineno"> 2620</span>&#160;            var r = Prepare2 (db, query, query.Length, out stmt, IntPtr.Zero);</div>
<div class="line"><a name="l02621"></a><span class="lineno"> 2621</span>&#160;            <span class="keywordflow">if</span> (r != <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">Result</a>.OK) {</div>
<div class="line"><a name="l02622"></a><span class="lineno"> 2622</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New (r, GetErrmsg (db));</div>
<div class="line"><a name="l02623"></a><span class="lineno"> 2623</span>&#160;            }</div>
<div class="line"><a name="l02624"></a><span class="lineno"> 2624</span>&#160;            <span class="keywordflow">return</span> stmt;</div>
<div class="line"><a name="l02625"></a><span class="lineno"> 2625</span>&#160;        }</div>
<div class="line"><a name="l02626"></a><span class="lineno"> 2626</span>&#160;</div>
<div class="line"><a name="l02627"></a><span class="lineno"> 2627</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_step&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02628"></a><span class="lineno"> 2628</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Step (IntPtr stmt);</div>
<div class="line"><a name="l02629"></a><span class="lineno"> 2629</span>&#160;</div>
<div class="line"><a name="l02630"></a><span class="lineno"> 2630</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_reset&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02631"></a><span class="lineno"> 2631</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Reset (IntPtr stmt);</div>
<div class="line"><a name="l02632"></a><span class="lineno"> 2632</span>&#160;</div>
<div class="line"><a name="l02633"></a><span class="lineno"> 2633</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_finalize&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02634"></a><span class="lineno"> 2634</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> Result Finalize (IntPtr stmt);</div>
<div class="line"><a name="l02635"></a><span class="lineno"> 2635</span>&#160;</div>
<div class="line"><a name="l02636"></a><span class="lineno"> 2636</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_last_insert_rowid&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02637"></a><span class="lineno"> 2637</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">long</span> LastInsertRowid (IntPtr db);</div>
<div class="line"><a name="l02638"></a><span class="lineno"> 2638</span>&#160;</div>
<div class="line"><a name="l02639"></a><span class="lineno"> 2639</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_errmsg16&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02640"></a><span class="lineno"> 2640</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> IntPtr Errmsg (IntPtr db);</div>
<div class="line"><a name="l02641"></a><span class="lineno"> 2641</span>&#160;</div>
<div class="line"><a name="l02642"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#aa4394a53972fa5a57d1980d72771d2f8"> 2642</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#aa4394a53972fa5a57d1980d72771d2f8">GetErrmsg</a> (IntPtr db)</div>
<div class="line"><a name="l02643"></a><span class="lineno"> 2643</span>&#160;        {</div>
<div class="line"><a name="l02644"></a><span class="lineno"> 2644</span>&#160;            <span class="keywordflow">return</span> Marshal.PtrToStringUni (Errmsg (db));</div>
<div class="line"><a name="l02645"></a><span class="lineno"> 2645</span>&#160;        }</div>
<div class="line"><a name="l02646"></a><span class="lineno"> 2646</span>&#160;</div>
<div class="line"><a name="l02647"></a><span class="lineno"> 2647</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_parameter_index&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02648"></a><span class="lineno"> 2648</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindParameterIndex (IntPtr stmt, [MarshalAs(UnmanagedType.LPStr)] <span class="keywordtype">string</span> name);</div>
<div class="line"><a name="l02649"></a><span class="lineno"> 2649</span>&#160;</div>
<div class="line"><a name="l02650"></a><span class="lineno"> 2650</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_null&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02651"></a><span class="lineno"> 2651</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindNull (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02652"></a><span class="lineno"> 2652</span>&#160;</div>
<div class="line"><a name="l02653"></a><span class="lineno"> 2653</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_int&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02654"></a><span class="lineno"> 2654</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindInt (IntPtr stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> val);</div>
<div class="line"><a name="l02655"></a><span class="lineno"> 2655</span>&#160;</div>
<div class="line"><a name="l02656"></a><span class="lineno"> 2656</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_int64&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02657"></a><span class="lineno"> 2657</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindInt64 (IntPtr stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">long</span> val);</div>
<div class="line"><a name="l02658"></a><span class="lineno"> 2658</span>&#160;</div>
<div class="line"><a name="l02659"></a><span class="lineno"> 2659</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_double&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02660"></a><span class="lineno"> 2660</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindDouble (IntPtr stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">double</span> val);</div>
<div class="line"><a name="l02661"></a><span class="lineno"> 2661</span>&#160;</div>
<div class="line"><a name="l02662"></a><span class="lineno"> 2662</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_text16&quot;</span>, CallingConvention=CallingConvention.Cdecl, CharSet = CharSet.Unicode)]</div>
<div class="line"><a name="l02663"></a><span class="lineno"> 2663</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindText (IntPtr stmt, <span class="keywordtype">int</span> index, [MarshalAs(UnmanagedType.LPWStr)] <span class="keywordtype">string</span> val, <span class="keywordtype">int</span> n, IntPtr free);</div>
<div class="line"><a name="l02664"></a><span class="lineno"> 2664</span>&#160;</div>
<div class="line"><a name="l02665"></a><span class="lineno"> 2665</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_bind_blob&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02666"></a><span class="lineno"> 2666</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> BindBlob (IntPtr stmt, <span class="keywordtype">int</span> index, byte[] val, <span class="keywordtype">int</span> n, IntPtr free);</div>
<div class="line"><a name="l02667"></a><span class="lineno"> 2667</span>&#160;</div>
<div class="line"><a name="l02668"></a><span class="lineno"> 2668</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_count&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02669"></a><span class="lineno"> 2669</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> ColumnCount (IntPtr stmt);</div>
<div class="line"><a name="l02670"></a><span class="lineno"> 2670</span>&#160;</div>
<div class="line"><a name="l02671"></a><span class="lineno"> 2671</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_name&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02672"></a><span class="lineno"> 2672</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> IntPtr ColumnName (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02673"></a><span class="lineno"> 2673</span>&#160;</div>
<div class="line"><a name="l02674"></a><span class="lineno"> 2674</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_name16&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02675"></a><span class="lineno"> 2675</span>&#160;        <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">extern</span> IntPtr ColumnName16Internal (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02676"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#aa866cecf10c391ec23b6902a85883905"> 2676</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#aa866cecf10c391ec23b6902a85883905">ColumnName16</a>(IntPtr stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02677"></a><span class="lineno"> 2677</span>&#160;        {</div>
<div class="line"><a name="l02678"></a><span class="lineno"> 2678</span>&#160;            <span class="keywordflow">return</span> Marshal.PtrToStringUni(ColumnName16Internal(stmt, index));</div>
<div class="line"><a name="l02679"></a><span class="lineno"> 2679</span>&#160;        }</div>
<div class="line"><a name="l02680"></a><span class="lineno"> 2680</span>&#160;</div>
<div class="line"><a name="l02681"></a><span class="lineno"> 2681</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_type&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02682"></a><span class="lineno"> 2682</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> ColType ColumnType (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02683"></a><span class="lineno"> 2683</span>&#160;</div>
<div class="line"><a name="l02684"></a><span class="lineno"> 2684</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_int&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02685"></a><span class="lineno"> 2685</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> ColumnInt (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02686"></a><span class="lineno"> 2686</span>&#160;</div>
<div class="line"><a name="l02687"></a><span class="lineno"> 2687</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_int64&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02688"></a><span class="lineno"> 2688</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">long</span> ColumnInt64 (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02689"></a><span class="lineno"> 2689</span>&#160;</div>
<div class="line"><a name="l02690"></a><span class="lineno"> 2690</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_double&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02691"></a><span class="lineno"> 2691</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">double</span> ColumnDouble (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02692"></a><span class="lineno"> 2692</span>&#160;</div>
<div class="line"><a name="l02693"></a><span class="lineno"> 2693</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_text&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02694"></a><span class="lineno"> 2694</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> IntPtr ColumnText (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02695"></a><span class="lineno"> 2695</span>&#160;</div>
<div class="line"><a name="l02696"></a><span class="lineno"> 2696</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_text16&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02697"></a><span class="lineno"> 2697</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> IntPtr ColumnText16 (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02698"></a><span class="lineno"> 2698</span>&#160;</div>
<div class="line"><a name="l02699"></a><span class="lineno"> 2699</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_blob&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02700"></a><span class="lineno"> 2700</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> IntPtr ColumnBlob (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02701"></a><span class="lineno"> 2701</span>&#160;</div>
<div class="line"><a name="l02702"></a><span class="lineno"> 2702</span>&#160;        [DllImport(<span class="stringliteral">&quot;sqlite3&quot;</span>, EntryPoint = <span class="stringliteral">&quot;sqlite3_column_bytes&quot;</span>, CallingConvention=CallingConvention.Cdecl)]</div>
<div class="line"><a name="l02703"></a><span class="lineno"> 2703</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> ColumnBytes (IntPtr stmt, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l02704"></a><span class="lineno"> 2704</span>&#160;</div>
<div class="line"><a name="l02705"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#a56f191689378e3ef6a0bf0266855a760"> 2705</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a56f191689378e3ef6a0bf0266855a760">ColumnString</a> (IntPtr stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02706"></a><span class="lineno"> 2706</span>&#160;        {</div>
<div class="line"><a name="l02707"></a><span class="lineno"> 2707</span>&#160;            <span class="keywordflow">return</span> Marshal.PtrToStringUni (SQLite3.ColumnText16 (stmt, index));</div>
<div class="line"><a name="l02708"></a><span class="lineno"> 2708</span>&#160;        }</div>
<div class="line"><a name="l02709"></a><span class="lineno"> 2709</span>&#160;</div>
<div class="line"><a name="l02710"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#a0af56f45546b2b3ed833ebb867494932"> 2710</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> byte[] <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a0af56f45546b2b3ed833ebb867494932">ColumnByteArray</a> (IntPtr stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02711"></a><span class="lineno"> 2711</span>&#160;        {</div>
<div class="line"><a name="l02712"></a><span class="lineno"> 2712</span>&#160;            <span class="keywordtype">int</span> length = ColumnBytes (stmt, index);</div>
<div class="line"><a name="l02713"></a><span class="lineno"> 2713</span>&#160;            byte[] result = <span class="keyword">new</span> byte[length];</div>
<div class="line"><a name="l02714"></a><span class="lineno"> 2714</span>&#160;            <span class="keywordflow">if</span> (length &gt; 0)</div>
<div class="line"><a name="l02715"></a><span class="lineno"> 2715</span>&#160;                Marshal.Copy (ColumnBlob (stmt, index), result, 0, length);</div>
<div class="line"><a name="l02716"></a><span class="lineno"> 2716</span>&#160;            <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l02717"></a><span class="lineno"> 2717</span>&#160;        }</div>
<div class="line"><a name="l02718"></a><span class="lineno"> 2718</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02719"></a><span class="lineno"> 2719</span>&#160;<span class="preprocessor"></span>        <span class="keyword">public</span> <span class="keyword">static</span> Result Open(<span class="keywordtype">string</span> filename, out <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db)</div>
<div class="line"><a name="l02720"></a><span class="lineno"> 2720</span>&#160;        {</div>
<div class="line"><a name="l02721"></a><span class="lineno"> 2721</span>&#160;            <span class="keywordflow">return</span> (Result) Sqlite3.sqlite3_open(filename, out db);</div>
<div class="line"><a name="l02722"></a><span class="lineno"> 2722</span>&#160;        }</div>
<div class="line"><a name="l02723"></a><span class="lineno"> 2723</span>&#160;</div>
<div class="line"><a name="l02724"></a><span class="lineno"> 2724</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> Result Open(<span class="keywordtype">string</span> filename, out <a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db, <span class="keywordtype">int</span> flags, IntPtr zVfs)</div>
<div class="line"><a name="l02725"></a><span class="lineno"> 2725</span>&#160;        {</div>
<div class="line"><a name="l02726"></a><span class="lineno"> 2726</span>&#160;<span class="preprocessor">#if USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l02727"></a><span class="lineno"> 2727</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_open_v2(filename, out db, flags, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l02728"></a><span class="lineno"> 2728</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02729"></a><span class="lineno"> 2729</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_open_v2(filename, out db, flags, null);</div>
<div class="line"><a name="l02730"></a><span class="lineno"> 2730</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02731"></a><span class="lineno"> 2731</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l02732"></a><span class="lineno"> 2732</span>&#160;</div>
<div class="line"><a name="l02733"></a><span class="lineno"> 2733</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">Result</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#a74160304a4a218b7508220106eeb10d0">Close</a>(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db)</div>
<div class="line"><a name="l02734"></a><span class="lineno"> 2734</span>&#160;        {</div>
<div class="line"><a name="l02735"></a><span class="lineno"> 2735</span>&#160;            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_close(db);</div>
<div class="line"><a name="l02736"></a><span class="lineno"> 2736</span>&#160;        }</div>
<div class="line"><a name="l02737"></a><span class="lineno"> 2737</span>&#160;</div>
<div class="line"><a name="l02738"></a><span class="lineno"> 2738</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">Result</a> <a class="code" href="class_s_q_lite_1_1_s_q_lite_connection.html#abb2b70df282aa2f1af07789db65db1dd">BusyTimeout</a>(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db, <span class="keywordtype">int</span> milliseconds)</div>
<div class="line"><a name="l02739"></a><span class="lineno"> 2739</span>&#160;        {</div>
<div class="line"><a name="l02740"></a><span class="lineno"> 2740</span>&#160;            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_busy_timeout(db, milliseconds);</div>
<div class="line"><a name="l02741"></a><span class="lineno"> 2741</span>&#160;        }</div>
<div class="line"><a name="l02742"></a><span class="lineno"> 2742</span>&#160;</div>
<div class="line"><a name="l02743"></a><span class="lineno"> 2743</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> Changes(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db)</div>
<div class="line"><a name="l02744"></a><span class="lineno"> 2744</span>&#160;        {</div>
<div class="line"><a name="l02745"></a><span class="lineno"> 2745</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_changes(db);</div>
<div class="line"><a name="l02746"></a><span class="lineno"> 2746</span>&#160;        }</div>
<div class="line"><a name="l02747"></a><span class="lineno"> 2747</span>&#160;</div>
<div class="line"><a name="l02748"></a><span class="lineno"> 2748</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> Prepare2(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db, <span class="keywordtype">string</span> query)</div>
<div class="line"><a name="l02749"></a><span class="lineno"> 2749</span>&#160;        {</div>
<div class="line"><a name="l02750"></a><span class="lineno"> 2750</span>&#160;            <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt = <span class="keywordflow">default</span>(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a>);</div>
<div class="line"><a name="l02751"></a><span class="lineno"> 2751</span>&#160;<span class="preprocessor">#if USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l02752"></a><span class="lineno"> 2752</span>&#160;<span class="preprocessor"></span>            var r = Sqlite3.sqlite3_prepare_v2(db, query, out stmt);</div>
<div class="line"><a name="l02753"></a><span class="lineno"> 2753</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02754"></a><span class="lineno"> 2754</span>&#160;<span class="preprocessor"></span>            stmt = <span class="keyword">new</span> <a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a>();</div>
<div class="line"><a name="l02755"></a><span class="lineno"> 2755</span>&#160;            var r = Sqlite3.sqlite3_prepare_v2(db, query, -1, ref stmt, 0);</div>
<div class="line"><a name="l02756"></a><span class="lineno"> 2756</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02757"></a><span class="lineno"> 2757</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">if</span> (r != 0)</div>
<div class="line"><a name="l02758"></a><span class="lineno"> 2758</span>&#160;            {</div>
<div class="line"><a name="l02759"></a><span class="lineno"> 2759</span>&#160;                <span class="keywordflow">throw</span> SQLiteException.New((<a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">Result</a>)r, GetErrmsg(db));</div>
<div class="line"><a name="l02760"></a><span class="lineno"> 2760</span>&#160;            }</div>
<div class="line"><a name="l02761"></a><span class="lineno"> 2761</span>&#160;            <span class="keywordflow">return</span> stmt;</div>
<div class="line"><a name="l02762"></a><span class="lineno"> 2762</span>&#160;        }</div>
<div class="line"><a name="l02763"></a><span class="lineno"> 2763</span>&#160;</div>
<div class="line"><a name="l02764"></a><span class="lineno"> 2764</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">Result</a> Step(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt)</div>
<div class="line"><a name="l02765"></a><span class="lineno"> 2765</span>&#160;        {</div>
<div class="line"><a name="l02766"></a><span class="lineno"> 2766</span>&#160;            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_step(stmt);</div>
<div class="line"><a name="l02767"></a><span class="lineno"> 2767</span>&#160;        }</div>
<div class="line"><a name="l02768"></a><span class="lineno"> 2768</span>&#160;</div>
<div class="line"><a name="l02769"></a><span class="lineno"> 2769</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">Result</a> <a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a526d688f37a86d3c3f27d0c5016eb71d">Reset</a>(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt)</div>
<div class="line"><a name="l02770"></a><span class="lineno"> 2770</span>&#160;        {</div>
<div class="line"><a name="l02771"></a><span class="lineno"> 2771</span>&#160;            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_reset(stmt);</div>
<div class="line"><a name="l02772"></a><span class="lineno"> 2772</span>&#160;        }</div>
<div class="line"><a name="l02773"></a><span class="lineno"> 2773</span>&#160;</div>
<div class="line"><a name="l02774"></a><span class="lineno"> 2774</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">Result</a> Finalize(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt)</div>
<div class="line"><a name="l02775"></a><span class="lineno"> 2775</span>&#160;        {</div>
<div class="line"><a name="l02776"></a><span class="lineno"> 2776</span>&#160;            <span class="keywordflow">return</span> (Result)Sqlite3.sqlite3_finalize(stmt);</div>
<div class="line"><a name="l02777"></a><span class="lineno"> 2777</span>&#160;        }</div>
<div class="line"><a name="l02778"></a><span class="lineno"> 2778</span>&#160;</div>
<div class="line"><a name="l02779"></a><span class="lineno"> 2779</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">long</span> LastInsertRowid(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db)</div>
<div class="line"><a name="l02780"></a><span class="lineno"> 2780</span>&#160;        {</div>
<div class="line"><a name="l02781"></a><span class="lineno"> 2781</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_last_insert_rowid(db);</div>
<div class="line"><a name="l02782"></a><span class="lineno"> 2782</span>&#160;        }</div>
<div class="line"><a name="l02783"></a><span class="lineno"> 2783</span>&#160;</div>
<div class="line"><a name="l02784"></a><span class="lineno"> 2784</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> GetErrmsg(<a class="code" href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a> db)</div>
<div class="line"><a name="l02785"></a><span class="lineno"> 2785</span>&#160;        {</div>
<div class="line"><a name="l02786"></a><span class="lineno"> 2786</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_errmsg(db);</div>
<div class="line"><a name="l02787"></a><span class="lineno"> 2787</span>&#160;        }</div>
<div class="line"><a name="l02788"></a><span class="lineno"> 2788</span>&#160;</div>
<div class="line"><a name="l02789"></a><span class="lineno"> 2789</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindParameterIndex(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">string</span> name)</div>
<div class="line"><a name="l02790"></a><span class="lineno"> 2790</span>&#160;        {</div>
<div class="line"><a name="l02791"></a><span class="lineno"> 2791</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_parameter_index(stmt, name);</div>
<div class="line"><a name="l02792"></a><span class="lineno"> 2792</span>&#160;        }</div>
<div class="line"><a name="l02793"></a><span class="lineno"> 2793</span>&#160;</div>
<div class="line"><a name="l02794"></a><span class="lineno"> 2794</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindNull(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02795"></a><span class="lineno"> 2795</span>&#160;        {</div>
<div class="line"><a name="l02796"></a><span class="lineno"> 2796</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_null(stmt, index);</div>
<div class="line"><a name="l02797"></a><span class="lineno"> 2797</span>&#160;        }</div>
<div class="line"><a name="l02798"></a><span class="lineno"> 2798</span>&#160;</div>
<div class="line"><a name="l02799"></a><span class="lineno"> 2799</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindInt(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> val)</div>
<div class="line"><a name="l02800"></a><span class="lineno"> 2800</span>&#160;        {</div>
<div class="line"><a name="l02801"></a><span class="lineno"> 2801</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_int(stmt, index, val);</div>
<div class="line"><a name="l02802"></a><span class="lineno"> 2802</span>&#160;        }</div>
<div class="line"><a name="l02803"></a><span class="lineno"> 2803</span>&#160;</div>
<div class="line"><a name="l02804"></a><span class="lineno"> 2804</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindInt64(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">long</span> val)</div>
<div class="line"><a name="l02805"></a><span class="lineno"> 2805</span>&#160;        {</div>
<div class="line"><a name="l02806"></a><span class="lineno"> 2806</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_int64(stmt, index, val);</div>
<div class="line"><a name="l02807"></a><span class="lineno"> 2807</span>&#160;        }</div>
<div class="line"><a name="l02808"></a><span class="lineno"> 2808</span>&#160;</div>
<div class="line"><a name="l02809"></a><span class="lineno"> 2809</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindDouble(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">double</span> val)</div>
<div class="line"><a name="l02810"></a><span class="lineno"> 2810</span>&#160;        {</div>
<div class="line"><a name="l02811"></a><span class="lineno"> 2811</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_double(stmt, index, val);</div>
<div class="line"><a name="l02812"></a><span class="lineno"> 2812</span>&#160;        }</div>
<div class="line"><a name="l02813"></a><span class="lineno"> 2813</span>&#160;</div>
<div class="line"><a name="l02814"></a><span class="lineno"> 2814</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindText(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, <span class="keywordtype">string</span> val, <span class="keywordtype">int</span> n, IntPtr free)</div>
<div class="line"><a name="l02815"></a><span class="lineno"> 2815</span>&#160;        {</div>
<div class="line"><a name="l02816"></a><span class="lineno"> 2816</span>&#160;<span class="preprocessor">#if USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l02817"></a><span class="lineno"> 2817</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_text(stmt, index, val, n);</div>
<div class="line"><a name="l02818"></a><span class="lineno"> 2818</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02819"></a><span class="lineno"> 2819</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_text(stmt, index, val, n, null);</div>
<div class="line"><a name="l02820"></a><span class="lineno"> 2820</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02821"></a><span class="lineno"> 2821</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l02822"></a><span class="lineno"> 2822</span>&#160;</div>
<div class="line"><a name="l02823"></a><span class="lineno"> 2823</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> BindBlob(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index, byte[] val, <span class="keywordtype">int</span> n, IntPtr free)</div>
<div class="line"><a name="l02824"></a><span class="lineno"> 2824</span>&#160;        {</div>
<div class="line"><a name="l02825"></a><span class="lineno"> 2825</span>&#160;<span class="preprocessor">#if USE_WP8_NATIVE_SQLITE</span></div>
<div class="line"><a name="l02826"></a><span class="lineno"> 2826</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_blob(stmt, index, val, n);</div>
<div class="line"><a name="l02827"></a><span class="lineno"> 2827</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l02828"></a><span class="lineno"> 2828</span>&#160;<span class="preprocessor"></span>            <span class="keywordflow">return</span> Sqlite3.sqlite3_bind_blob(stmt, index, val, n, null);</div>
<div class="line"><a name="l02829"></a><span class="lineno"> 2829</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02830"></a><span class="lineno"> 2830</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l02831"></a><span class="lineno"> 2831</span>&#160;</div>
<div class="line"><a name="l02832"></a><span class="lineno"> 2832</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ColumnCount(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt)</div>
<div class="line"><a name="l02833"></a><span class="lineno"> 2833</span>&#160;        {</div>
<div class="line"><a name="l02834"></a><span class="lineno"> 2834</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_count(stmt);</div>
<div class="line"><a name="l02835"></a><span class="lineno"> 2835</span>&#160;        }</div>
<div class="line"><a name="l02836"></a><span class="lineno"> 2836</span>&#160;</div>
<div class="line"><a name="l02837"></a><span class="lineno"> 2837</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> ColumnName(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02838"></a><span class="lineno"> 2838</span>&#160;        {</div>
<div class="line"><a name="l02839"></a><span class="lineno"> 2839</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_name(stmt, index);</div>
<div class="line"><a name="l02840"></a><span class="lineno"> 2840</span>&#160;        }</div>
<div class="line"><a name="l02841"></a><span class="lineno"> 2841</span>&#160;</div>
<div class="line"><a name="l02842"></a><span class="lineno"> 2842</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> ColumnName16(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02843"></a><span class="lineno"> 2843</span>&#160;        {</div>
<div class="line"><a name="l02844"></a><span class="lineno"> 2844</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_name(stmt, index);</div>
<div class="line"><a name="l02845"></a><span class="lineno"> 2845</span>&#160;        }</div>
<div class="line"><a name="l02846"></a><span class="lineno"> 2846</span>&#160;</div>
<div class="line"><a name="l02847"></a><span class="lineno"> 2847</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> ColType ColumnType(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02848"></a><span class="lineno"> 2848</span>&#160;        {</div>
<div class="line"><a name="l02849"></a><span class="lineno"> 2849</span>&#160;            <span class="keywordflow">return</span> (ColType)Sqlite3.sqlite3_column_type(stmt, index);</div>
<div class="line"><a name="l02850"></a><span class="lineno"> 2850</span>&#160;        }</div>
<div class="line"><a name="l02851"></a><span class="lineno"> 2851</span>&#160;</div>
<div class="line"><a name="l02852"></a><span class="lineno"> 2852</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ColumnInt(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02853"></a><span class="lineno"> 2853</span>&#160;        {</div>
<div class="line"><a name="l02854"></a><span class="lineno"> 2854</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_int(stmt, index);</div>
<div class="line"><a name="l02855"></a><span class="lineno"> 2855</span>&#160;        }</div>
<div class="line"><a name="l02856"></a><span class="lineno"> 2856</span>&#160;</div>
<div class="line"><a name="l02857"></a><span class="lineno"> 2857</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">long</span> ColumnInt64(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02858"></a><span class="lineno"> 2858</span>&#160;        {</div>
<div class="line"><a name="l02859"></a><span class="lineno"> 2859</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_int64(stmt, index);</div>
<div class="line"><a name="l02860"></a><span class="lineno"> 2860</span>&#160;        }</div>
<div class="line"><a name="l02861"></a><span class="lineno"> 2861</span>&#160;</div>
<div class="line"><a name="l02862"></a><span class="lineno"> 2862</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">double</span> ColumnDouble(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02863"></a><span class="lineno"> 2863</span>&#160;        {</div>
<div class="line"><a name="l02864"></a><span class="lineno"> 2864</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_double(stmt, index);</div>
<div class="line"><a name="l02865"></a><span class="lineno"> 2865</span>&#160;        }</div>
<div class="line"><a name="l02866"></a><span class="lineno"> 2866</span>&#160;</div>
<div class="line"><a name="l02867"></a><span class="lineno"> 2867</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> ColumnText(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02868"></a><span class="lineno"> 2868</span>&#160;        {</div>
<div class="line"><a name="l02869"></a><span class="lineno"> 2869</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_text(stmt, index);</div>
<div class="line"><a name="l02870"></a><span class="lineno"> 2870</span>&#160;        }</div>
<div class="line"><a name="l02871"></a><span class="lineno"> 2871</span>&#160;</div>
<div class="line"><a name="l02872"></a><span class="lineno"> 2872</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> ColumnText16(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02873"></a><span class="lineno"> 2873</span>&#160;        {</div>
<div class="line"><a name="l02874"></a><span class="lineno"> 2874</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_text(stmt, index);</div>
<div class="line"><a name="l02875"></a><span class="lineno"> 2875</span>&#160;        }</div>
<div class="line"><a name="l02876"></a><span class="lineno"> 2876</span>&#160;</div>
<div class="line"><a name="l02877"></a><span class="lineno"> 2877</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> byte[] ColumnBlob(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02878"></a><span class="lineno"> 2878</span>&#160;        {</div>
<div class="line"><a name="l02879"></a><span class="lineno"> 2879</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_blob(stmt, index);</div>
<div class="line"><a name="l02880"></a><span class="lineno"> 2880</span>&#160;        }</div>
<div class="line"><a name="l02881"></a><span class="lineno"> 2881</span>&#160;</div>
<div class="line"><a name="l02882"></a><span class="lineno"> 2882</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ColumnBytes(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02883"></a><span class="lineno"> 2883</span>&#160;        {</div>
<div class="line"><a name="l02884"></a><span class="lineno"> 2884</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_bytes(stmt, index);</div>
<div class="line"><a name="l02885"></a><span class="lineno"> 2885</span>&#160;        }</div>
<div class="line"><a name="l02886"></a><span class="lineno"> 2886</span>&#160;</div>
<div class="line"><a name="l02887"></a><span class="lineno"> 2887</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">string</span> ColumnString(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02888"></a><span class="lineno"> 2888</span>&#160;        {</div>
<div class="line"><a name="l02889"></a><span class="lineno"> 2889</span>&#160;            <span class="keywordflow">return</span> Sqlite3.sqlite3_column_text(stmt, index);</div>
<div class="line"><a name="l02890"></a><span class="lineno"> 2890</span>&#160;        }</div>
<div class="line"><a name="l02891"></a><span class="lineno"> 2891</span>&#160;</div>
<div class="line"><a name="l02892"></a><span class="lineno"> 2892</span>&#160;        <span class="keyword">public</span> <span class="keyword">static</span> byte[] ColumnByteArray(<a class="code" href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a> stmt, <span class="keywordtype">int</span> index)</div>
<div class="line"><a name="l02893"></a><span class="lineno"> 2893</span>&#160;        {</div>
<div class="line"><a name="l02894"></a><span class="lineno"> 2894</span>&#160;            <span class="keywordflow">return</span> ColumnBlob(stmt, index);</div>
<div class="line"><a name="l02895"></a><span class="lineno"> 2895</span>&#160;        }</div>
<div class="line"><a name="l02896"></a><span class="lineno"> 2896</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l02897"></a><span class="lineno"> 2897</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l02898"></a><span class="lineno"><a class="line" href="class_s_q_lite_1_1_s_q_lite3.html#a05b95fc7fa35a5d8a13847a9abc9273a"> 2898</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="class_s_q_lite_1_1_s_q_lite3.html#a05b95fc7fa35a5d8a13847a9abc9273a">ColType</a> : <span class="keywordtype">int</span></div>
<div class="line"><a name="l02899"></a><span class="lineno"> 2899</span>&#160;        {</div>
<div class="line"><a name="l02900"></a><span class="lineno"> 2900</span>&#160;            Integer = 1,</div>
<div class="line"><a name="l02901"></a><span class="lineno"> 2901</span>&#160;            Float = 2,</div>
<div class="line"><a name="l02902"></a><span class="lineno"> 2902</span>&#160;            Text = 3,</div>
<div class="line"><a name="l02903"></a><span class="lineno"> 2903</span>&#160;            Blob = 4,</div>
<div class="line"><a name="l02904"></a><span class="lineno"> 2904</span>&#160;            Null = 5</div>
<div class="line"><a name="l02905"></a><span class="lineno"> 2905</span>&#160;        }</div>
<div class="line"><a name="l02906"></a><span class="lineno"> 2906</span>&#160;    }</div>
<div class="line"><a name="l02907"></a><span class="lineno"> 2907</span>&#160;}</div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_aa4f8f4620985ceca6db33ab061649f29"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#aa4f8f4620985ceca6db33ab061649f29">SQLite.TableMapping.TableName</a></div><div class="ttdeci">string TableName</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01413">SQLite.cs:1413</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info_html"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html">SQLite.SQLiteConnection.ColumnInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00357">SQLite.cs:357</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html">SQLite.SQLite3</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02544">SQLite.cs:2544</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info_html_af1ba3d13d1ccc9d2389c086f4e64610c"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#af1ba3d13d1ccc9d2389c086f4e64610c">SQLite.SQLiteConnection.ColumnInfo.ToString</a></div><div class="ttdeci">override string ToString()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00373">SQLite.cs:373</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a2c8187a19b5065f6b23c079e7cca29fe"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a2c8187a19b5065f6b23c079e7cca29fe">SQLite.SQLiteConnection.Commit</a></div><div class="ttdeci">void Commit()</div><div class="ttdoc">Commits the transaction that was begun by BeginTransaction. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00880">SQLite.cs:880</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_command_html_a6d1c61aa253c05e163506aec881bfb49"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_command.html#a6d1c61aa253c05e163506aec881bfb49">SQLite.SQLiteCommand.ToString</a></div><div class="ttdeci">override string ToString()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01863">SQLite.cs:1863</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_a858d8d3031d8fca47fbc24a0bc752177"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#a858d8d3031d8fca47fbc24a0bc752177">SQLite.TableMapping.GetInsertCommand</a></div><div class="ttdeci">PreparedSqlLiteInsertCommand GetInsertCommand(SQLiteConnection conn, string extra)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01519">SQLite.cs:1519</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_aa4394a53972fa5a57d1980d72771d2f8"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#aa4394a53972fa5a57d1980d72771d2f8">SQLite.SQLite3.GetErrmsg</a></div><div class="ttdeci">static string GetErrmsg(IntPtr db)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02642">SQLite.cs:2642</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_exception_html_a973d7bbe93363a91182d852fed38f5f3"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_exception.html#a973d7bbe93363a91182d852fed38f5f3">SQLite.SQLiteException.Result</a></div><div class="ttdeci">SQLite3.Result Result</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00052">SQLite.cs:52</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_string_html"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection_string.html">SQLite.SQLiteConnectionString</a></div><div class="ttdoc">Represents a parsed connection string. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01300">SQLite.cs:1300</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_command_html_adc2e4047e52cc3da0307a74e74e276f7"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_command.html#adc2e4047e52cc3da0307a74e74e276f7">SQLite.SQLiteCommand.Bind</a></div><div class="ttdeci">void Bind(string name, object val)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01850">SQLite.cs:1850</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a5fbb3e385d21cfbee95e4a2a71a3043b"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a5fbb3e385d21cfbee95e4a2a71a3043b">SQLite.SQLiteConnection.Execute</a></div><div class="ttdeci">int Execute(string query, params object[] args)</div><div class="ttdoc">Creates a SQLiteCommand given the command text (SQL) with arguments. Place a &#39;?&#39; in the command text ...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00462">SQLite.cs:462</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_column_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_column_attribute.html">SQLite.ColumnAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01335">SQLite.cs:1335</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439a131fb182a881796e7606ed6da27f1197"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a131fb182a881796e7606ed6da27f1197">SQLite.ReadOnly</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439a54f0a906e1d7cbe43867c40793c22c91"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a54f0a906e1d7cbe43867c40793c22c91">SQLite.PrivateCache</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439aed897a216de36c7c934c4baa02b4fea7"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439aed897a216de36c7c934c4baa02b4fea7">SQLite.NoMutex</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_attribute_html_aa1d302b1fb306a6f5fcbbf5116c9ac55"><div class="ttname"><a href="class_s_q_lite_1_1_table_attribute.html#aa1d302b1fb306a6f5fcbbf5116c9ac55">SQLite.TableAttribute.TableAttribute</a></div><div class="ttdeci">TableAttribute(string name)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01328">SQLite.cs:1328</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a783032226b2db2ebd6417f21abe9cd5a"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a783032226b2db2ebd6417f21abe9cd5a">SQLite.SQLiteConnection.DropTable&lt; T &gt;</a></div><div class="ttdeci">int DropTable&lt; T &gt;()</div><div class="ttdoc">Executes a &quot;drop table&quot; on the database. This is non-recoverable. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00264">SQLite.cs:264</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_abb2b70df282aa2f1af07789db65db1dd"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#abb2b70df282aa2f1af07789db65db1dd">SQLite.SQLiteConnection.BusyTimeout</a></div><div class="ttdeci">TimeSpan BusyTimeout</div><div class="ttdoc">Sets a busy handler to sleep the specified amount of time when a table is locked. The handler will sl...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00188">SQLite.cs:188</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a0af56f45546b2b3ed833ebb867494932"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a0af56f45546b2b3ed833ebb867494932">SQLite.SQLite3.ColumnByteArray</a></div><div class="ttdeci">static byte[] ColumnByteArray(IntPtr stmt, int index)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02710">SQLite.cs:2710</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439a3c2d862f4536788c6b00eb3bbdcd81bf"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a3c2d862f4536788c6b00eb3bbdcd81bf">SQLite.ProtectionNone</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a4bf49d4c603ea8a6db6d65e51bdd6458"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a4bf49d4c603ea8a6db6d65e51bdd6458">SQLite.TableQuery&lt; T &gt;.Skip</a></div><div class="ttdeci">TableQuery&lt; T &gt; Skip(int n)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02170">SQLite.cs:2170</a></div></div>
<div class="ttc" id="_s_q_lite_8cs_html_ab557efa2a7318f6132dd96d8ee66bf7c"><div class="ttname"><a href="_s_q_lite_8cs.html#ab557efa2a7318f6132dd96d8ee66bf7c">Sqlite3Statement</a></div><div class="ttdeci">System.IntPtr Sqlite3Statement</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00045">SQLite.cs:45</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_max_length_attribute_html_ade550746d23ce2d766d0e1debe57c606"><div class="ttname"><a href="class_s_q_lite_1_1_max_length_attribute.html#ade550746d23ce2d766d0e1debe57c606">SQLite.MaxLengthAttribute.MaxLengthAttribute</a></div><div class="ttdeci">MaxLengthAttribute(int length)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01392">SQLite.cs:1392</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a1bb344641cee231bb4d07bbc26905732"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a1bb344641cee231bb4d07bbc26905732">SQLite.SQLite3.Result</a></div><div class="ttdeci">Result</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02546">SQLite.cs:2546</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a19576a29af1c0891a646ff3e904f2cdc"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a19576a29af1c0891a646ff3e904f2cdc">SQLite.SQLiteConnection.Insert</a></div><div class="ttdeci">int Insert(object obj, Type objType)</div><div class="ttdoc">Inserts the given object and retrieves its auto incremented primary key if it has one...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01028">SQLite.cs:1028</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a2e3874f45af10a8c44db821c7a848aab"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a2e3874f45af10a8c44db821c7a848aab">SQLite.TableQuery&lt; T &gt;.TableQuery</a></div><div class="ttdeci">TableQuery(SQLiteConnection conn)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02125">SQLite.cs:2125</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ab571412a681990a95131ded731ad6c4a"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ab571412a681990a95131ded731ad6c4a">SQLite.SQLiteConnection.SaveTransactionPoint</a></div><div class="ttdeci">string SaveTransactionPoint()</div><div class="ttdoc">Creates a savepoint in the database at the current point in the transaction timeline. Begins a new transaction if one is not in progress. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00766">SQLite.cs:766</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a158964fb1e56e6679ab94cf101dcc6b3"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a158964fb1e56e6679ab94cf101dcc6b3">SQLite.TableQuery&lt; T &gt;.Deferred</a></div><div class="ttdeci">TableQuery&lt; T &gt; Deferred()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02183">SQLite.cs:2183</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_indexed_attribute_html_a4c01c07e1c18a6d4743316c5f0760a34"><div class="ttname"><a href="class_s_q_lite_1_1_indexed_attribute.html#a4c01c07e1c18a6d4743316c5f0760a34">SQLite.IndexedAttribute.IndexedAttribute</a></div><div class="ttdeci">IndexedAttribute()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01362">SQLite.cs:1362</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a95729c5ebf5fad75631109db91e7c14b"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a95729c5ebf5fad75631109db91e7c14b">SQLite.SQLiteConnection.Find</a></div><div class="ttdeci">object Find(object pk, TableMapping map)</div><div class="ttdoc">Attempts to retrieve an object with the given primary key from the table associated with the specifie...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00685">SQLite.cs:685</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a0d4046198236b8c96b0bf50593f592a6"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a0d4046198236b8c96b0bf50593f592a6">SQLite.SQLiteConnection.Delete&lt; T &gt;</a></div><div class="ttdeci">int Delete&lt; T &gt;(object primaryKey)</div><div class="ttdoc">Deletes the object with the specified primary key. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01229">SQLite.cs:1229</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ab359d97e7938a573e0a565d2c46aa401"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ab359d97e7938a573e0a565d2c46aa401">SQLite.SQLiteConnection.DeferredQuery</a></div><div class="ttdeci">IEnumerable&lt; object &gt; DeferredQuery(TableMapping map, string query, params object[] args)</div><div class="ttdoc">Creates a SQLiteCommand given the command text (SQL) with arguments. Place a &#39;?&#39; in the command text ...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00600">SQLite.cs:600</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_a57da9f36b0a6b357dc1cec41b855b637"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#a57da9f36b0a6b357dc1cec41b855b637">SQLite.Orm.Collation</a></div><div class="ttdeci">static string Collation(MemberInfo p)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01683">SQLite.cs:1683</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_af85031e61990a4d11d10533da5acb21c"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#af85031e61990a4d11d10533da5acb21c">SQLite.SQLiteConnection.GetTableInfo</a></div><div class="ttdeci">IEnumerable&lt; ColumnInfo &gt; GetTableInfo(string tableName)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00379">SQLite.cs:379</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_unique_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_unique_attribute.html">SQLite.UniqueAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01379">SQLite.cs:1379</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ab44d5100216c3cdcea76e45c6f7d6246"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ab44d5100216c3cdcea76e45c6f7d6246">SQLite.SQLiteConnection.Table&lt; T &gt;</a></div><div class="ttdeci">TableQuery&lt; T &gt; Table&lt; T &gt;()</div><div class="ttdoc">Returns a queryable interface to the table represented by the given type. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00613">SQLite.cs:613</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_base_table_query_html"><div class="ttname"><a href="class_s_q_lite_1_1_base_table_query.html">SQLite.BaseTableQuery</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02091">SQLite.cs:2091</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_aa866cecf10c391ec23b6902a85883905"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#aa866cecf10c391ec23b6902a85883905">SQLite.SQLite3.ColumnName16</a></div><div class="ttdeci">static string ColumnName16(IntPtr stmt, int index)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02676">SQLite.cs:2676</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_abc1454c5581e01ee57873a8c59101d5c"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#abc1454c5581e01ee57873a8c59101d5c">SQLite.TableQuery&lt; T &gt;.Take</a></div><div class="ttdeci">TableQuery&lt; T &gt; Take(int n)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02163">SQLite.cs:2163</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a89dee8d36b455dda9cf587f12ce541ec"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a89dee8d36b455dda9cf587f12ce541ec">SQLite.SQLite3.Prepare2</a></div><div class="ttdeci">static IntPtr Prepare2(IntPtr db, string query)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02617">SQLite.cs:2617</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a7535db6cca83fcde078fa4340b32e982"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a7535db6cca83fcde078fa4340b32e982">SQLite.SQLiteConnection.NewCommand</a></div><div class="ttdeci">virtual SQLiteCommand NewCommand()</div><div class="ttdoc">Creates a new SQLiteCommand. Can be overridden to provide a sub-class. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00413">SQLite.cs:413</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_ab71131c8ed49c2c5276a555af0d564f2"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#ab71131c8ed49c2c5276a555af0d564f2">SQLite.TableMapping.FindColumnWithPropertyName</a></div><div class="ttdeci">Column FindColumnWithPropertyName(string propertyName)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01504">SQLite.cs:1504</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_indexed_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_indexed_attribute.html">SQLite.IndexedAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01356">SQLite.cs:1356</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_command_html_afd03d0602268aef6f9300d60f6102265"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_command.html#afd03d0602268aef6f9300d60f6102265">SQLite.SQLiteCommand.Bind</a></div><div class="ttdeci">void Bind(object val)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01858">SQLite.cs:1858</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a62b62415941ce6486f7dfa219a69f1f1"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a62b62415941ce6486f7dfa219a69f1f1">SQLite.SQLiteConnection.InsertAll</a></div><div class="ttdeci">int InsertAll(System.Collections.IEnumerable objects, string extra)</div><div class="ttdoc">Inserts all specified objects. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00942">SQLite.cs:942</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ae4effee772569a47256bcb5f8764eabc"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ae4effee772569a47256bcb5f8764eabc">SQLite.SQLiteConnection.Update</a></div><div class="ttdeci">int Update(object obj)</div><div class="ttdoc">Updates all of the columns of a table using the specified object except for its primary key...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01129">SQLite.cs:1129</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_command_html_a7a2b9afd67f691520b73bfb0efb18b9b"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_command.html#a7a2b9afd67f691520b73bfb0efb18b9b">SQLite.SQLiteCommand.ExecuteNonQuery</a></div><div class="ttdeci">int ExecuteNonQuery()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01744">SQLite.cs:1744</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_prepared_sql_lite_insert_command_html"><div class="ttname"><a href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html">SQLite.PreparedSqlLiteInsertCommand</a></div><div class="ttdoc">Since the insert never changed, we only need to prepare once. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02010">SQLite.cs:2010</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439ae16febbf8611e3d5db7ed971e2bcb0f7"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439ae16febbf8611e3d5db7ed971e2bcb0f7">SQLite.ProtectionCompleteUnlessOpen</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_ignore_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_ignore_attribute.html">SQLite.IgnoreAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01374">SQLite.cs:1374</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a1b868498215ae2491a6ecf1f1669c4db"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a1b868498215ae2491a6ecf1f1669c4db">SQLite.SQLite3.ConfigOption</a></div><div class="ttdeci">ConfigOption</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02579">SQLite.cs:2579</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a9132bae9e577ae479ddc6b919547759f"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a9132bae9e577ae479ddc6b919547759f">SQLite.SQLiteConnection.RunInTransaction</a></div><div class="ttdeci">void RunInTransaction(Action action)</div><div class="ttdoc">Executes within a (possibly nested) transaction by wrapping it in a SAVEPOINT. If an exception occurs...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00898">SQLite.cs:898</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_af925b9fddec261394ab29fbbaa25d9a0"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#af925b9fddec261394ab29fbbaa25d9a0">SQLite.SQLiteConnection.TimeExecution</a></div><div class="ttdeci">bool TimeExecution</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00096">SQLite.cs:96</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a1c24728cf622f060629aac155e2afcaa"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c24728cf622f060629aac155e2afcaa">SQLite.SQLiteConnection.StoreDateTimeAsTicks</a></div><div class="ttdeci">bool StoreDateTimeAsTicks</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00100">SQLite.cs:100</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_a6dc5a789752e31c8d928d554e3256fca"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#a6dc5a789752e31c8d928d554e3256fca">SQLite.Orm.GetIndices</a></div><div class="ttdeci">static IEnumerable&lt; IndexedAttribute &gt; GetIndices(MemberInfo p)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01708">SQLite.cs:1708</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a3ab0fde4b10c4b492b2f5f64535c6d66"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a3ab0fde4b10c4b492b2f5f64535c6d66">SQLite.SQLiteConnection.Insert</a></div><div class="ttdeci">int Insert(object obj, string extra)</div><div class="ttdoc">Inserts the given object and retrieves its auto incremented primary key if it has one...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01067">SQLite.cs:1067</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439a3322fce9aa781563c086ffd3c13da8b4"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a3322fce9aa781563c086ffd3c13da8b4">SQLite.FullMutex</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_ad270c1798dba02b61e14c2039070eeee"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#ad270c1798dba02b61e14c2039070eeee">SQLite.Orm.IsPK</a></div><div class="ttdeci">static bool IsPK(MemberInfo p)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01673">SQLite.cs:1673</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a9450dfedb603c08eb75f57f36db41d9b"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a9450dfedb603c08eb75f57f36db41d9b">SQLite.SQLiteConnection.IsInTransaction</a></div><div class="ttdeci">bool IsInTransaction</div><div class="ttdoc">Whether BeginTransaction has been called and the database is waiting for a Commit. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00709">SQLite.cs:709</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a5d9bc1e1c29e1da74671e17033f2badb"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a5d9bc1e1c29e1da74671e17033f2badb">SQLite.TableQuery&lt; T &gt;.First</a></div><div class="ttdeci">T First()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02531">SQLite.cs:2531</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a504b348bb83df3b51fb49937db4d7804"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a504b348bb83df3b51fb49937db4d7804">SQLite.SQLiteConnection.Handle</a></div><div class="ttdeci">Sqlite3DatabaseHandle Handle</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00091">SQLite.cs:91</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a39aad9b1b6a78224ce2ee2ac056895e4"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a39aad9b1b6a78224ce2ee2ac056895e4">SQLite.SQLite3.Step</a></div><div class="ttdeci">static Result Step(IntPtr stmt)</div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_a1b6aca5cdaa9c0f8b6f5c1ecbb12affc"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#a1b6aca5cdaa9c0f8b6f5c1ecbb12affc">SQLite.TableMapping.FindColumn</a></div><div class="ttdeci">Column FindColumn(string columnName)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01510">SQLite.cs:1510</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_1_1_column_html"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping_1_1_column.html">SQLite.TableMapping.Column</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01570">SQLite.cs:1570</a></div></div>
<div class="ttc" id="namespace_system_sharp_1_1_components_html_ad268018ef23fa93dc0631786a118b530a526d688f37a86d3c3f27d0c5016eb71d"><div class="ttname"><a href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a526d688f37a86d3c3f27d0c5016eb71d">SystemSharp.Components.Reset</a></div><div class="ttdoc">Marks a reset signal input port. </div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a1a95399fe5d61f8bbb56e36eac38d467"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a1a95399fe5d61f8bbb56e36eac38d467">SQLite.SQLiteConnection.UpdateAll</a></div><div class="ttdeci">int UpdateAll(System.Collections.IEnumerable objects)</div><div class="ttdoc">Updates all specified objects. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01186">SQLite.cs:1186</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_aeac8a5ef1be5cfabc5bbf33f1fec01b0"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#aeac8a5ef1be5cfabc5bbf33f1fec01b0">SQLite.SQLiteConnection.Query</a></div><div class="ttdeci">List&lt; object &gt; Query(TableMapping map, string query, params object[] args)</div><div class="ttdoc">Creates a SQLiteCommand given the command text (SQL) with arguments. Place a &#39;?&#39; in the command text ...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00572">SQLite.cs:572</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html">SQLite.TableQuery&lt; T &gt;</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02100">SQLite.cs:2100</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_prepared_sql_lite_insert_command_html_a4569b8fb13658e105658b073937efead"><div class="ttname"><a href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a4569b8fb13658e105658b073937efead">SQLite.PreparedSqlLiteInsertCommand.Dispose</a></div><div class="ttdeci">void Dispose()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02067">SQLite.cs:2067</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_1_1_column_html_a0f57d48181580599bd9b4aa6db68687c"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a0f57d48181580599bd9b4aa6db68687c">SQLite.TableMapping.Column.SetValue</a></div><div class="ttdeci">void SetValue(object obj, object val)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01608">SQLite.cs:1608</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ac0c3b1e8f8060ef9777fac08751d159e"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ac0c3b1e8f8060ef9777fac08751d159e">SQLite.SQLiteConnection.TableMappings</a></div><div class="ttdeci">IEnumerable&lt; TableMapping &gt; TableMappings</div><div class="ttdoc">Returns the mappings from types to tables that the connection currently understands. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00202">SQLite.cs:202</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a1c16c3dda43037326b7f2afc6c822abd"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a1c16c3dda43037326b7f2afc6c822abd">SQLite.SQLiteConnection.InsertOrReplace</a></div><div class="ttdeci">int InsertOrReplace(object obj)</div><div class="ttdoc">Inserts the given object and retrieves its auto incremented primary key if it has one...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01007">SQLite.cs:1007</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_auto_increment_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_auto_increment_attribute.html">SQLite.AutoIncrementAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01351">SQLite.cs:1351</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a05b95fc7fa35a5d8a13847a9abc9273a"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a05b95fc7fa35a5d8a13847a9abc9273a">SQLite.SQLite3.ColType</a></div><div class="ttdeci">ColType</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02898">SQLite.cs:2898</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a112ac999fccd302bda742992f044f3ee"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a112ac999fccd302bda742992f044f3ee">SQLite.SQLiteConnection.CreateCommand</a></div><div class="ttdeci">SQLiteCommand CreateCommand(string cmdText, params object[] ps)</div><div class="ttdoc">Creates a new SQLiteCommand given the command text with arguments. Place a &#39;?&#39; in the command text fo...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00431">SQLite.cs:431</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439add8141c2dbba4f369c304f748a6badf6"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439add8141c2dbba4f369c304f748a6badf6">SQLite.SharedCache</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info_html_a6ff7d46bc88a8f3484f7b701732396fe"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection_1_1_column_info.html#a6ff7d46bc88a8f3484f7b701732396fe">SQLite.SQLiteConnection.ColumnInfo.Name</a></div><div class="ttdeci">string Name</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00362">SQLite.cs:362</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html">SQLite.SQLiteConnection</a></div><div class="ttdoc">Represents an open connection to a SQLite database. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00079">SQLite.cs:79</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ab474a534faebfec1288672ef4e4f2140"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ab474a534faebfec1288672ef4e4f2140">SQLite.SQLiteConnection.Update</a></div><div class="ttdeci">int Update(object obj, Type objType)</div><div class="ttdoc">Updates all of the columns of a table using the specified object except for its primary key...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01151">SQLite.cs:1151</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a74160304a4a218b7508220106eeb10d0"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a74160304a4a218b7508220106eeb10d0">SQLite.SQLiteConnection.Close</a></div><div class="ttdeci">void Close()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01274">SQLite.cs:1274</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_command_html"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_command.html">SQLite.SQLiteCommand</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01730">SQLite.cs:1730</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_1_1_column_html_a332cee07dfb8fa137dece836bd9dd0ad"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping_1_1_column.html#a332cee07dfb8fa137dece836bd9dd0ad">SQLite.TableMapping.Column.Column</a></div><div class="ttdeci">Column(PropertyInfo prop)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01592">SQLite.cs:1592</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_base_table_query_1_1_ordering_html"><div class="ttname"><a href="class_s_q_lite_1_1_base_table_query_1_1_ordering.html">SQLite.BaseTableQuery.Ordering</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02093">SQLite.cs:2093</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a812215a88043259b6a107994756000ae"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a812215a88043259b6a107994756000ae">SQLite.SQLiteConnection.InsertOrReplace</a></div><div class="ttdeci">int InsertOrReplace(object obj, Type objType)</div><div class="ttdoc">Inserts the given object and retrieves its auto incremented primary key if it has one...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01049">SQLite.cs:1049</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_adfe66fe8c304aca8575f07fc1c05d9f5"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#adfe66fe8c304aca8575f07fc1c05d9f5">SQLite.SQLiteConnection.Find&lt; T &gt;</a></div><div class="ttdeci">T Find&lt; T &gt;(object pk)</div><div class="ttdoc">Attempts to retrieve an object with the given primary key from the table associated with the specifie...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00664">SQLite.cs:664</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_exception_html"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_exception.html">SQLite.SQLiteException</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00050">SQLite.cs:50</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite3_html_a56f191689378e3ef6a0bf0266855a760"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite3.html#a56f191689378e3ef6a0bf0266855a760">SQLite.SQLite3.ColumnString</a></div><div class="ttdeci">static string ColumnString(IntPtr stmt, int index)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02705">SQLite.cs:2705</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_a5243e3a4791a06448b358116676d8e98"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#a5243e3a4791a06448b358116676d8e98">SQLite.Orm.SqlType</a></div><div class="ttdeci">static string SqlType(TableMapping.Column p, bool storeDateTimeAsTicks)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01644">SQLite.cs:1644</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_aafcda8a0d85fc7708bc29cc1ae254be5"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#aafcda8a0d85fc7708bc29cc1ae254be5">SQLite.TableQuery&lt; T &gt;.Where</a></div><div class="ttdeci">TableQuery&lt; T &gt; Where(Expression&lt; Func&lt; T, bool &gt;&gt; predExpr)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02150">SQLite.cs:2150</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ad9e1e281245e83dbe9c5303eaefe95f6"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ad9e1e281245e83dbe9c5303eaefe95f6">SQLite.SQLiteConnection.Dispose</a></div><div class="ttdeci">void Dispose()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01263">SQLite.cs:1263</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a70cfe1d5799d71ce3a0a62c244bb7ea8"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a70cfe1d5799d71ce3a0a62c244bb7ea8">SQLite.SQLiteConnection.Rollback</a></div><div class="ttdeci">void Rollback()</div><div class="ttdoc">Rolls back the transaction that was begun by BeginTransaction or SaveTransactionPoint. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00801">SQLite.cs:801</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a55234164e36bc4abcb086e197f25e436"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a55234164e36bc4abcb086e197f25e436">SQLite.SQLiteConnection.Delete</a></div><div class="ttdeci">int Delete(object objectToDelete)</div><div class="ttdoc">Deletes the given object from the database using its primary key. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01206">SQLite.cs:1206</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_afc74d6d1b8ca720c3a26d6a0c0ca6b86"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#afc74d6d1b8ca720c3a26d6a0c0ca6b86">SQLite.TableQuery&lt; T &gt;.Count</a></div><div class="ttdeci">int Count()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02513">SQLite.cs:2513</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a1a76c62e25bff4f6bbf5366175ab3bf7"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a1a76c62e25bff4f6bbf5366175ab3bf7">SQLite.SQLiteConnection.CreateTable&lt; T &gt;</a></div><div class="ttdeci">int CreateTable&lt; T &gt;()</div><div class="ttdoc">Executes a &quot;create table if not exists&quot; on the database. It also creates any specified indexes on the...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00282">SQLite.cs:282</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a517c2275d7bd055d07f0b810cb8ae179"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a517c2275d7bd055d07f0b810cb8ae179">SQLite.TableQuery&lt; T &gt;.FirstOrDefault</a></div><div class="ttdeci">T FirstOrDefault()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02537">SQLite.cs:2537</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_a02f2ce7280201f572621b75e106add15"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#a02f2ce7280201f572621b75e106add15">SQLite.TableMapping.SetAutoIncPK</a></div><div class="ttdeci">void SetAutoIncPK(object obj, long id)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01479">SQLite.cs:1479</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a3929d540dd0a888291077626d4690202"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a3929d540dd0a888291077626d4690202">SQLite.TableQuery&lt; T &gt;.GetEnumerator</a></div><div class="ttdeci">IEnumerator&lt; T &gt; GetEnumerator()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02518">SQLite.cs:2518</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a920c3f7421ad1c967730228abb5915fc"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a920c3f7421ad1c967730228abb5915fc">SQLite.SQLiteConnection.InsertAll</a></div><div class="ttdeci">int InsertAll(System.Collections.IEnumerable objects)</div><div class="ttdoc">Inserts all specified objects. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00919">SQLite.cs:919</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_adf0ed08567e1ca36e4fda72c94ede544"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#adf0ed08567e1ca36e4fda72c94ede544">SQLite.SQLiteConnection.GetMapping&lt; T &gt;</a></div><div class="ttdeci">TableMapping GetMapping&lt; T &gt;()</div><div class="ttdoc">Retrieves the mapping that is automatically generated for the given type. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00242">SQLite.cs:242</a></div></div>
<div class="ttc" id="_s_q_lite_8cs_html_a0137d4c5059675164f7580c64441f40c"><div class="ttname"><a href="_s_q_lite_8cs.html#a0137d4c5059675164f7580c64441f40c">Sqlite3DatabaseHandle</a></div><div class="ttdeci">System.IntPtr Sqlite3DatabaseHandle</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00044">SQLite.cs:44</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ade363948abe65a6b97fe8574f943db91"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ade363948abe65a6b97fe8574f943db91">SQLite.SQLiteConnection.Query&lt; T &gt;</a></div><div class="ttdeci">List&lt; T &gt; Query&lt; T &gt;(string query, params object[] args)</div><div class="ttdoc">Creates a SQLiteCommand given the command text (SQL) with arguments. Place a &#39;?&#39; in the command text ...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00523">SQLite.cs:523</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439a686e697538050e4664636337cc3b834f"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a686e697538050e4664636337cc3b834f">SQLite.Create</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html">SQLite.TableMapping</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01409">SQLite.cs:1409</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_acf2d379f40ca0ac2cfa6204a1d50e201"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#acf2d379f40ca0ac2cfa6204a1d50e201">SQLite.TableMapping.GetByPrimaryKeySql</a></div><div class="ttdeci">string GetByPrimaryKeySql</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01419">SQLite.cs:1419</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a94674fbf861328e85a249dd8c14ef6ea"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a94674fbf861328e85a249dd8c14ef6ea">SQLite.SQLiteConnection.RollbackTo</a></div><div class="ttdeci">void RollbackTo(string savepoint)</div><div class="ttdoc">Rolls back the savepoint created by BeginTransaction or SaveTransactionPoint. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00810">SQLite.cs:810</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_exception_html_a360138124608a44ec47ab94e6bb988f8"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_exception.html#a360138124608a44ec47ab94e6bb988f8">SQLite.SQLiteException.SQLiteException</a></div><div class="ttdeci">SQLiteException(SQLite3.Result r, string message)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00054">SQLite.cs:54</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_max_length_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_max_length_attribute.html">SQLite.MaxLengthAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01388">SQLite.cs:1388</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_af88acbe7da213c81875c3a35a5d61337"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#af88acbe7da213c81875c3a35a5d61337">SQLite.SQLiteConnection.ExecuteScalar&lt; T &gt;</a></div><div class="ttdeci">T ExecuteScalar&lt; T &gt;(string query, params object[] args)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00485">SQLite.cs:485</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a937382b36e6726d12fe6d09f7bfb0ab6"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a937382b36e6726d12fe6d09f7bfb0ab6">SQLite.SQLiteConnection.Insert</a></div><div class="ttdeci">int Insert(object obj)</div><div class="ttdoc">Inserts the given object and retrieves its auto incremented primary key if it has one...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00986">SQLite.cs:986</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439a70a2a84088d405a2e3f1e3accaa16723"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439a70a2a84088d405a2e3f1e3accaa16723">SQLite.ReadWrite</a></div></div>
<div class="ttc" id="namespace_system_sharp_1_1_components_html_ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e"><div class="ttname"><a href="namespace_system_sharp_1_1_components.html#ad268018ef23fa93dc0631786a118b530a8eea62084ca7e541d918e823422bd82e">SystemSharp.Components.Result</a></div><div class="ttdoc">Marks a result output port. </div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a21204da14d0e2a44039f3395bb4ff12d"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a21204da14d0e2a44039f3395bb4ff12d">SQLite.SQLiteConnection.SQLiteConnection</a></div><div class="ttdeci">SQLiteConnection(string databasePath, bool storeDateTimeAsTicks=false)</div><div class="ttdoc">Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00114">SQLite.cs:114</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_prepared_sql_lite_insert_command_html_a9f95629a1b978710741c23129d78fccc"><div class="ttname"><a href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a9f95629a1b978710741c23129d78fccc">SQLite.PreparedSqlLiteInsertCommand.ExecuteNonQuery</a></div><div class="ttdeci">int ExecuteNonQuery(object[] source)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02026">SQLite.cs:2026</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439ad729bc99ed371feb5cc190b05f417172"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439ad729bc99ed371feb5cc190b05f417172">SQLite.ProtectionCompleteUntilFirstUserAuthentication</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_string_html_ae5ec4b3dabdbb7c581d0931382fb06ef"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection_string.html#ae5ec4b3dabdbb7c581d0931382fb06ef">SQLite.SQLiteConnectionString.SQLiteConnectionString</a></div><div class="ttdeci">SQLiteConnectionString(string databasePath, bool storeDateTimeAsTicks)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01310">SQLite.cs:1310</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439">SQLite.SQLiteOpenFlags</a></div><div class="ttdeci">SQLiteOpenFlags</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00066">SQLite.cs:66</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_a895ae223b0511768682d43379fcf2f3e"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#a895ae223b0511768682d43379fcf2f3e">SQLite.Orm.IsAutoInc</a></div><div class="ttdeci">static bool IsAutoInc(MemberInfo p)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01698">SQLite.cs:1698</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_ae108c0714634387100fccf5001b73672"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#ae108c0714634387100fccf5001b73672">SQLite.TableMapping.Columns</a></div><div class="ttdeci">Column[] Columns</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01415">SQLite.cs:1415</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_prepared_sql_lite_insert_command_html_a207353ff88c74bc45cb076fe3cf463bb"><div class="ttname"><a href="class_s_q_lite_1_1_prepared_sql_lite_insert_command.html#a207353ff88c74bc45cb076fe3cf463bb">SQLite.PreparedSqlLiteInsertCommand.Prepare</a></div><div class="ttdeci">virtual Sqlite3Statement Prepare()</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02061">SQLite.cs:2061</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_column_attribute_html_aa7ecb3d322d1fde710f51558b314ad6f"><div class="ttname"><a href="class_s_q_lite_1_1_column_attribute.html#aa7ecb3d322d1fde710f51558b314ad6f">SQLite.ColumnAttribute.ColumnAttribute</a></div><div class="ttdeci">ColumnAttribute(string name)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01339">SQLite.cs:1339</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a17fdec8364635853d573e84530e1ab48"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a17fdec8364635853d573e84530e1ab48">SQLite.SQLiteConnection.Get&lt; T &gt;</a></div><div class="ttdeci">T Get&lt; T &gt;(object pk)</div><div class="ttdoc">Attempts to retrieve an object with the given primary key from the table associated with the specifie...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00630">SQLite.cs:630</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a08e03803dd01aa67ee56a8e6d184c9d9"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a08e03803dd01aa67ee56a8e6d184c9d9">SQLite.SQLiteConnection.InsertAll</a></div><div class="ttdeci">int InsertAll(System.Collections.IEnumerable objects, Type objType)</div><div class="ttdoc">Inserts all specified objects. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00965">SQLite.cs:965</a></div></div>
<div class="ttc" id="namespace_s_q_lite_html_a9d72cc097c53dbc96a6f0eec530cc439af6b459b732ab3369bd8fb1b31d3d019d"><div class="ttname"><a href="namespace_s_q_lite.html#a9d72cc097c53dbc96a6f0eec530cc439af6b459b732ab3369bd8fb1b31d3d019d">SQLite.ProtectionComplete</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_collation_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_collation_attribute.html">SQLite.CollationAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01399">SQLite.cs:1399</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ab88782cd2d5c77bb14d6a17baf7c49bc"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ab88782cd2d5c77bb14d6a17baf7c49bc">SQLite.SQLiteConnection.Insert</a></div><div class="ttdeci">int Insert(object obj, string extra, Type objType)</div><div class="ttdoc">Inserts the given object and retrieves its auto incremented primary key if it has one...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01091">SQLite.cs:1091</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_ab5e33e84b34867c48d1578d2890ff7e7"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#ab5e33e84b34867c48d1578d2890ff7e7">SQLite.SQLiteConnection.Dispose</a></div><div class="ttdeci">virtual void Dispose(bool disposing)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01269">SQLite.cs:1269</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a18b410ed380268c16bb9bdb47b5ad44b"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a18b410ed380268c16bb9bdb47b5ad44b">SQLite.SQLiteConnection.DatabasePath</a></div><div class="ttdeci">string DatabasePath</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00094">SQLite.cs:94</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_aba3becdb524808bd49f349587f1b7049"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#aba3becdb524808bd49f349587f1b7049">SQLite.SQLiteConnection.BeginTransaction</a></div><div class="ttdeci">void BeginTransaction()</div><div class="ttdoc">Begins a new transaction. Call Commit to end the transaction. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00717">SQLite.cs:717</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_1_1_column_html_ac2e9f8110d390d1fa630ebb0d345c293"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping_1_1_column.html#ac2e9f8110d390d1fa630ebb0d345c293">SQLite.TableMapping.Column.GetValue</a></div><div class="ttdeci">object GetValue(object obj)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01613">SQLite.cs:1613</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_adb6d510f2918202a99622c34f8b2636c"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#adb6d510f2918202a99622c34f8b2636c">SQLite.Orm.SqlDecl</a></div><div class="ttdeci">static string SqlDecl(TableMapping.Column p, bool storeDateTimeAsTicks)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01624">SQLite.cs:1624</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a334b139ead4620ad13b5e1d54e8077af"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a334b139ead4620ad13b5e1d54e8077af">SQLite.SQLiteConnection.DeferredQuery&lt; T &gt;</a></div><div class="ttdeci">IEnumerable&lt; T &gt; DeferredQuery&lt; T &gt;(string query, params object[] args)</div><div class="ttdoc">Creates a SQLiteCommand given the command text (SQL) with arguments. Place a &#39;?&#39; in the command text ...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00546">SQLite.cs:546</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_query_3_01_t_01_4_html_a1adf19dc2456239c4b4a900995b2794d"><div class="ttname"><a href="class_s_q_lite_1_1_table_query_3_01_t_01_4.html#a1adf19dc2456239c4b4a900995b2794d">SQLite.TableQuery&lt; T &gt;.ElementAt</a></div><div class="ttdeci">T ElementAt(int index)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l02177">SQLite.cs:2177</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html_a51f2ca22f2399618082849f30a699efd"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html#a51f2ca22f2399618082849f30a699efd">SQLite.Orm.MaxStringLength</a></div><div class="ttdeci">static int MaxStringLength(PropertyInfo p)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01714">SQLite.cs:1714</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_primary_key_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_primary_key_attribute.html">SQLite.PrimaryKeyAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01346">SQLite.cs:1346</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a3e1bbdd7aebce4f815ca35b8277e1270"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a3e1bbdd7aebce4f815ca35b8277e1270">SQLite.SQLiteConnection.CreateTable</a></div><div class="ttdeci">int CreateTable(Type ty)</div><div class="ttdoc">Executes a &quot;create table if not exists&quot; on the database. It also creates any specified indexes on the...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00297">SQLite.cs:297</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a6813c9dd152354284ccdc96353bcfbdd"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a6813c9dd152354284ccdc96353bcfbdd">SQLite.SQLiteConnection.Release</a></div><div class="ttdeci">void Release(string savepoint)</div><div class="ttdoc">Releases a savepoint returned from SaveTransactionPoint. Releasing a savepoint makes changes since th...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00847">SQLite.cs:847</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_orm_html"><div class="ttname"><a href="class_s_q_lite_1_1_orm.html">SQLite.Orm</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01620">SQLite.cs:1620</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_indexed_attribute_html_a6d43155fc211d6c76d27326c66c39752"><div class="ttname"><a href="class_s_q_lite_1_1_indexed_attribute.html#a6d43155fc211d6c76d27326c66c39752">SQLite.IndexedAttribute.IndexedAttribute</a></div><div class="ttdeci">IndexedAttribute(string name, int order)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01366">SQLite.cs:1366</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_abed406a2cd17e1e360b79924a749b67c"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#abed406a2cd17e1e360b79924a749b67c">SQLite.SQLiteConnection.DeleteAll&lt; T &gt;</a></div><div class="ttdeci">int DeleteAll&lt; T &gt;()</div><div class="ttdoc">Deletes all the objects from the specified table. WARNING WARNING: Let me repeat. It deletes ALL the ...</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01251">SQLite.cs:1251</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a5d0deb6299d3f479e53cf81899023457"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a5d0deb6299d3f479e53cf81899023457">SQLite.SQLiteConnection.SQLiteConnection</a></div><div class="ttdeci">SQLiteConnection(string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks=false)</div><div class="ttdoc">Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00131">SQLite.cs:131</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_collation_attribute_html_a741b7b18adbbefa4c7922d254c8a3afc"><div class="ttname"><a href="class_s_q_lite_1_1_collation_attribute.html#a741b7b18adbbefa4c7922d254c8a3afc">SQLite.CollationAttribute.CollationAttribute</a></div><div class="ttdeci">CollationAttribute(string collation)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01403">SQLite.cs:1403</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_af9e92ae222dba65b2ab761139531118a"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#af9e92ae222dba65b2ab761139531118a">SQLite.SQLiteConnection.Trace</a></div><div class="ttdeci">bool Trace</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00098">SQLite.cs:98</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_exception_html_ac74e9093fc476760b090efb43d226a97"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_exception.html#ac74e9093fc476760b090efb43d226a97">SQLite.SQLiteException.New</a></div><div class="ttdeci">static SQLiteException New(SQLite3.Result r, string message)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00059">SQLite.cs:59</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_connection_html_a25b7a6e9e1fa2e2ead47bb1821822fc6"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_connection.html#a25b7a6e9e1fa2e2ead47bb1821822fc6">SQLite.SQLiteConnection.GetMapping</a></div><div class="ttdeci">TableMapping GetMapping(Type type)</div><div class="ttdoc">Retrieves the mapping that is automatically generated for the given type. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l00222">SQLite.cs:222</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_attribute_html"><div class="ttname"><a href="class_s_q_lite_1_1_table_attribute.html">SQLite.TableAttribute</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01324">SQLite.cs:1324</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_s_q_lite_command_html_a4761647a6b02f398aa1d7bbd1f090828"><div class="ttname"><a href="class_s_q_lite_1_1_s_q_lite_command.html#a4761647a6b02f398aa1d7bbd1f090828">SQLite.SQLiteCommand.OnInstanceCreated</a></div><div class="ttdeci">virtual void OnInstanceCreated(object obj)</div><div class="ttdoc">Invoked every time an instance is loaded from the database. </div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01792">SQLite.cs:1792</a></div></div>
<div class="ttc" id="class_s_q_lite_1_1_table_mapping_html_a57758525caf3216677a9474721630ecb"><div class="ttname"><a href="class_s_q_lite_1_1_table_mapping.html#a57758525caf3216677a9474721630ecb">SQLite.TableMapping.TableMapping</a></div><div class="ttdeci">TableMapping(Type type)</div><div class="ttdef"><b>Definition:</b> <a href="_s_q_lite_8cs_source.html#l01425">SQLite.cs:1425</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bb5e995590685548b7e11478911ee7c3.html">SystemSharp-Google-SVN</a></li><li class="navelem"><a class="el" href="dir_8deefa4467a62b572b52d238d562b104.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_7468bd2063bbdded308e1b920d17719d.html">XilinxSupportLib</a></li><li class="navelem"><a class="el" href="_s_q_lite_8cs.html">SQLite.cs</a></li>
    <li class="footer">Generated on Thu Dec 26 2013 14:21:43 for SystemSharp by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
